config/logger.js
function buildConsoleLogger (level = 'info') {
  return function (api) {
    return winston.createLogger({
      format: winston.format.combine(
        winston.format.timestamp(),
        winston.format.colorize(),
        winston.format.printf(info => {
          return `${api.id} @ ${info.timestamp} - ${info.level}: ${info.message} ${stringifyExtraMessagePropertiesForConsole(info)}`
        })
      ),
      level,
      levels: winston.config.syslog.levels,
      transports: [ new winston.transports.Console() ]
    })
  }
}
function buildConsoleLogger (level = 'info') {
  return function (api) {
    return winston.createLogger({
      format: winston.format.combine(
        winston.format.timestamp(),
        winston.format.colorize(),
        winston.format.printf(info => {
          return `${api.id} @ ${info.timestamp} - ${info.level}: ${info.message} ${stringifyExtraMessagePropertiesForConsole(info)}`
        })
      ),
      level,
      levels: winston.config.syslog.levels,
      transports: [ new winston.transports.Console() ]
    })
  }
}
function buildConsoleLogger ( level = 'info' ) { return function ( api ) { return winston . createLogger ( { format : winston . format . combine ( winston . format . timestamp ( ) , winston . format . colorize ( ) , winston . format . printf ( info => { return ` ${ api . id } ${ info . timestamp } ${ info . level } ${ info . message } ${ stringifyExtraMessagePropertiesForConsole ( info ) } ` } ) ) , level , levels : winston . config . syslog . levels , transports : [ new winston . transports . Console ( ) ] } ) } }
learn more about winston v3 loggers @ - https://github.com/winstonjs/winston - https://github.com/winstonjs/winston/blob/master/docs/transports.md
learn more about winston v3 loggers