-
-
Save AllGistsEqual/0ab4355340a31656bf41686ed72b0692 to your computer and use it in GitHub Desktop.
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
// File: src/index.js | |
const logger = tag => | |
winston.createLogger({ | |
levels: logLevels, | |
transports: [new winston.transports.Console({ colorize: true, timestamp: true })], | |
format: winston.format.combine( | |
winston.format.colorize(), | |
winston.format.padLevels({ levels: logLevels }), | |
winston.format.timestamp(), | |
winston.format.printf(info => `${info.timestamp} ${info.level}: ${tag}${info.message}`), | |
), | |
level: 'debug', | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment