Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// log setup
import winston from 'winston';
const transports = {
console: new winston.transports.Console({ level: 'warn' }),
const logger = winston.createLogger({
transports: [transports.console, transports.file]
});'This will not be logged in console transport because warn is set!');
transports.console.level = 'info'; // changed the level'This will be logged in now!');
export default {logger, transport}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment