-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the options to colorize only the level, only the message or all.
Default behavior is kept. Using true will only colorize the level and false will not colorize anything.
- Loading branch information
1 parent
b420477
commit 72273b1
Showing
3 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var winston = require('../lib/winston'); | ||
|
||
var logger = module.exports = new (winston.Logger)({ | ||
transports: [ | ||
new (winston.transports.Console)({ | ||
colorize: 'all' | ||
}) | ||
] | ||
}); | ||
|
||
logger.log('info', 'This is an information message.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters