diff --git a/README.md b/README.md index 69be33546..aff33f829 100644 --- a/README.md +++ b/README.md @@ -574,10 +574,11 @@ winston.info("127.0.0.1 - there's no place like home"); ``` `winston` allows you to define a `level` property on each transport which -specifies the **maximum** level of messages that a transport should log. For -example, using the `syslog` levels you could log only `error` messages to the -console and everything `info` and below to a file (which includes `error` -messages): +specifies the **maximum** level (that is, the minimum severity, as explained +on Logging Levels above) of messages that a transport should log. For +example, using the `npm` levels you could log only `error` messages to the +console and everything `info` and below (which includes `error` +messages, but will exclude eg. http and verbose) to a file : ``` js const logger = winston.createLogger({ @@ -590,6 +591,10 @@ const logger = winston.createLogger({ }) ] }); + +logger.debug('Will not be logged in either transport!'); +logger.info('Will be logged only in File!'); +logger.error('Will be logged by both transports!'); ``` You may also dynamically change the log level of a transport: @@ -1268,4 +1273,4 @@ npm test [Charlie Robbins]: http://github.com/indexzero [Jarrett Cruger]: https://github.com/jcrugzz [David Hyde]: https://github.com/dabh -[Chris Alderson]: https://github.com/chrisalderson \ No newline at end of file +[Chris Alderson]: https://github.com/chrisalderson