Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yossi-eynav committed Feb 18, 2024
1 parent afc3d18 commit 8684d39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions server/api/lib/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};
2 changes: 1 addition & 1 deletion server/bin/serve
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});

Expand Down

0 comments on commit 8684d39

Please sign in to comment.