wikijs-fork/server/modules/logging/papertrail/logger.js
2018-09-01 15:15:44 -04:00

18 lines
421 B
JavaScript

const winston = require('winston')
// ------------------------------------
// Papertrail
// ------------------------------------
module.exports = {
init (logger, conf) {
require('winston-papertrail').Papertrail // eslint-disable-line no-unused-expressions
logger.add(new winston.transports.Papertrail({
host: conf.host,
port: conf.port,
level: 'warn',
program: 'wiki.js'
}))
}
}