Skip to content

Missing documenttation on fomaters #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
agirorn opened this issue Jul 1, 2016 · 7 comments
Closed

Missing documenttation on fomaters #293

agirorn opened this issue Jul 1, 2016 · 7 comments

Comments

@agirorn
Copy link

agirorn commented Jul 1, 2016

I can't seam to find the documentation on what formaters are available and how they work.

So far I have found 2

var debug = require('debug')('test')
debug('string: %s', 'THE STRING');
test string: THE STRING +0ms
debug('string: %o', { key: "VALUE" });
test string: { key: 'VALUE' } +1m

Are there any other formaters?

@elmigranto
Copy link

It is probably the same as util.format.

@nkolban
Copy link

nkolban commented Aug 20, 2016

Reviewing the code, it does indeed use "util.format". The action from this issue will be to mention that in the programmer's guide and provide a link to util.format:

https://nodejs.org/api/util.html#util_util_format_format

@agirorn
Copy link
Author

agirorn commented Aug 25, 2016

When you talk about the programmer's guide do you mean https://github.com/visionmedia/debug/wiki ?

@nkolban
Copy link

nkolban commented Aug 25, 2016

I'm imaging a programmer who comes along and wants to use the debug package. In order for them to use the package, they will look for a "programmers guide" ... this will be a document describing how to use the package and the options available for the APIs. Whether this is a PDF, a web page, the Wiki or a README.md ... all of those are options. When I talk about a "Programmer's Guide" I am thinking more in the abstract concept of it rather than in a specific place. In this example, probably the Wiki is ideal with a reference to the Wiki in the README.md of the project.

@agirorn
Copy link
Author

agirorn commented Aug 26, 2016

So for now, should I add this to the wiki or make a pull request that mentions this in the README ?

@thebigredgeek
Copy link
Contributor

Happy to take a PR for this @agirorn

@thebigredgeek
Copy link
Contributor

This should be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants