Skip to content
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

Add documentation example of different transports for different levels #123

Closed
domenic opened this issue Apr 3, 2012 · 3 comments
Closed

Comments

@domenic
Copy link
Contributor

domenic commented Apr 3, 2012

The "Motiviation" section of the readme says

Each instance of a winston logger can have multiple transports configured at different levels. For example, one may want error logs to be stored in a persistent remote location (like a database), but all logs output to the console or a local file.

I've been through the readme three or four times, but still can't see how to accomplish this. Could an example of such be added to the docs?

For example, I want to send info (and above) to a file, but error (and above) to email me. How do I create a logger that does this?

@domenic
Copy link
Contributor Author

domenic commented Apr 3, 2012

Argggggh of course I see it thirty seconds after logging the issue. It's not mentioned in the "Using Log Levels" section, but instead mentioned in each of the individual transport documentation sections:

The Console transport takes two simple options:

level: Level of messages that this transport should log (default 'debug').

I'll do a pull request to add a note to the "Using Log Levels" section.

@coderarity
Copy link
Contributor

Also note that this option is actually part of the base Transport, so all of the transports will support it just by inheriting from Transport.

@coderarity
Copy link
Contributor

Fixed in 16dc3a9.

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

Successfully merging a pull request may close this issue.

2 participants