How would a human read a json winston log file?

Simply set the file transport “json” property to false, and you’ll get a human readable log. Same as you see in the console.

    var winston = require('winston');
    var logger = new winston.Logger({
      transports: [
        new winston.transports.File({
          json: false,
          filename:'log.log'
        }),
        new winston.transports.Console()
      ],
      exitOnError: false
    });
   logger.log('info', 'some msg');

Leave a Comment

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