-
-
Save AllGistsEqual/59d2db5b8e1bba9c642107e4b0e466bc 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 | |
// add the configured new logger using winston.createLogger() | |
const logger = 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}:${info.message}`), | |
), | |
level: 'debug', | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment