Winston : understanding logging levels

As per the documentation, you can set your own Logging levels, 0 being lowest, and associate colours with it. Now, if you don’t want to log the lowest level, just set the level property to the corresponding level. By default, the console logger has it’s level set to info

So, here is an example:

logger = new (winston.Logger)({
  levels: {
    'info': 0,
    'ok': 1,
    'error': 2
  }
  transports: [
    new (winston.transports.ConsoleTransport)(silent: options.silent, level: 'ok')
  ]
});

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)