Skip to content

Commit

Permalink
#477 change log format (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
prayerslayer authored Jul 4, 2016
1 parent 8031d38 commit 4365229
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server/src/yourturn.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ var IN_PROD = process.env.NODE_ENV === 'production',

winston.remove(winston.transports.Console);
winston.add(winston.transports.Console, {
timestamp: true,
timestamp: () => (new Date()).toISOString(),
showLevel: true,
colorize: IN_PROD ? false : true,
level: IN_PROD ? 'info' : 'debug'
colorize: false,
level: IN_PROD ? 'info' : 'debug',
formatter: IN_PROD ?
opts => `${opts.level.toUpperCase()} ${opts.message || ''} ${opts.meta ? '[' + JSON.stringify(opts.meta) + ']' : ''}` :
opts => `${opts.timestamp()} ${opts.level.toUpperCase()} ${opts.message || ''} ${opts.meta ? '[' + JSON.stringify(opts.meta) + ']' : ''}`
});

// set up 3rd party monitoring
Expand Down

0 comments on commit 4365229

Please sign in to comment.