Loggger - Winston

TIP

You can find the source code of this package at packages/core-logger-winston.

Installation

yarn add @arkecosystem/core-logger-winston

Configuration

module.exports = {
  transports: {
    console: {
      constructor: 'Console',
      options: {
        level: process.env.ARK_LOG_LEVEL || 'debug',
        format: require('./formatter')(true),
        stderrLevels: ['error', 'warn'],
      },
    },
    dailyRotate: {
      package: 'winston-daily-rotate-file',
      constructor: 'DailyRotateFile',
      options: {
        level: process.env.ARK_LOG_LEVEL || 'debug',
        format: require('./formatter')(false),
        filename: process.env.ARK_LOG_FILE || `${process.env.ARK_PATH_DATA}/logs/core/${process.env.ARK_NETWORK_NAME}/%DATE%.log`,
        datePattern: 'YYYY-MM-DD',
        zippedArchive: true,
        maxSize: '100m',
        maxFiles: '10',
      },
    },
  },
}
Last Updated: 11/22/2018, 3:13:54 AM