const winston = require('winston') const config = require('config') const logger = winston.createLogger({ level: 'info', format: winston.format.combine( winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }), winston.format.errors({ stack: true }), winston.format.splat(), winston.format.json() ), defaultMeta: { service: 'noisedash' }, transports: [ // // - Write to all logs with level `info` and below to `quick-start-combined.log`. // - Write all logs error (and below) to `quick-start-error.log`. // new winston.transports.File({ filename: config.get('Server.logFilePath') }) ] }) module.exports = logger