Browse Source

Changing logging format

develop
Drew Short 5 years ago
parent
commit
19ca104ae3
  1. 4
      src/logging.ts

4
src/logging.ts

@ -21,7 +21,7 @@ let logger = winston.createLogger({
format: winston.format.combine(
winston.format.timestamp(),
winston.format.splat(),
winston.format.json()
winston.format.simple()
),
defaultMeta: { service: 'baphomet-js' },
transports: [
@ -33,6 +33,7 @@ let logger = winston.createLogger({
if (process.env.NODE_ENV !== 'production') {
logger.add(new winston.transports.Console({
format: winston.format.combine(
winston.format.colorize(),
winston.format.simple()
)
}));
@ -40,6 +41,7 @@ if (process.env.NODE_ENV !== 'production') {
logger.add(new winston.transports.Console({
level: 'error',
format: winston.format.combine(
winston.format.colorize(),
winston.format.simple()
)
}));

Loading…
Cancel
Save