logger.js 387 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
const winston = require('winston')

// ------------------------------------
// Loggly
// ------------------------------------

module.exports = {
  init (logger, conf) {
    require('winston-loggly-bulk')
10
    logger.add(new winston.transports.Loggly({
11 12 13 14 15
      token: conf.token,
      subdomain: conf.subdomain,
      tags: ['wiki-js'],
      level: 'warn',
      json: true
16
    }))
17 18
  }
}