some quick updates to get cconvert up and working again
This commit is contained in:
@@ -3,17 +3,16 @@ const config = require('../config');
|
||||
|
||||
const logger = winston.createLogger({
|
||||
level: config.isProduction ? 'info' : 'debug',
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp(),
|
||||
winston.format.errors({ stack: true }),
|
||||
winston.format.json()
|
||||
),
|
||||
defaultMeta: { service: 'bnkops-map' },
|
||||
transports: [
|
||||
new winston.transports.Console({
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),
|
||||
winston.format.errors({ stack: true }),
|
||||
winston.format.colorize(),
|
||||
winston.format.simple()
|
||||
winston.format.printf(({ timestamp, level, message, service }) => {
|
||||
return `${timestamp} [${service}] ${level}: ${message}`;
|
||||
})
|
||||
)
|
||||
})
|
||||
]
|
||||
@@ -23,10 +22,20 @@ const logger = winston.createLogger({
|
||||
if (config.isProduction) {
|
||||
logger.add(new winston.transports.File({
|
||||
filename: 'error.log',
|
||||
level: 'error'
|
||||
level: 'error',
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp(),
|
||||
winston.format.errors({ stack: true }),
|
||||
winston.format.json()
|
||||
)
|
||||
}));
|
||||
logger.add(new winston.transports.File({
|
||||
filename: 'combined.log'
|
||||
filename: 'combined.log',
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp(),
|
||||
winston.format.errors({ stack: true }),
|
||||
winston.format.json()
|
||||
)
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user