diff --git a/server/api/lib/log.js b/server/api/lib/log.js index e37c22c9..4419fe07 100644 --- a/server/api/lib/log.js +++ b/server/api/lib/log.js @@ -43,22 +43,17 @@ const logger = winston.createLogger({ ] }); - - module.exports = { debug: (...args) => { - logger.debug({message: args.join(',')}); + logger.debug(...args); }, info: (...args) => { - logger.info({message: args.join(",")}); + logger.info(...args); }, error: (...args) => { - logger.error({message: args.join(",")}); - }, - errorW: (message, payload) => { - logger.error({message, ...payload}); + logger.error(...args); }, warn: (...args) => { - logger.warn({message: args.join(",")}); + logger.warn(...args); } }; diff --git a/server/bin/serve b/server/bin/serve index 3cf34c9d..410f6213 100644 --- a/server/bin/serve +++ b/server/bin/serve @@ -10,7 +10,7 @@ const logger = require('../api/lib/log') process.on('uncaughtException', function(err) { - logger.errorW('uncaught exception', { err }) + logger.error('uncaught exception', { err }) throw err; });