Skip to content

Commit

Permalink
Update eslint and eslint-config
Browse files Browse the repository at this point in the history
  • Loading branch information
mantoni committed Feb 2, 2022
1 parent 3f5b1a5 commit f1c20a2
Show file tree
Hide file tree
Showing 4 changed files with 1,273 additions and 1,545 deletions.
12 changes: 7 additions & 5 deletions lib/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ function addError(entry, error) {
entry.data = entry.data ? Object.assign({}, entry.data) : {};
entry.data.code = error.code;
if (cause_props.length) {
entry.data.cause = cause_props.reduce(
(o, k) => ((o[k] = cause[k]), o), {});
entry.data.cause = cause_props.reduce((o, k) => {
o[k] = cause[k];
return o;
}, {});
}
}
entry.stack = error.stack || String(error);
Expand Down Expand Up @@ -112,9 +114,9 @@ Object.keys(topics).forEach((topic) => {
});

module.exports = Object.assign((ns, data) => {
const log = state.loggers[ns] || (state.loggers[ns] = new Logger(ns));
log.data = data || null;
return log;
const logger = state.loggers[ns] || (state.loggers[ns] = new Logger(ns));
logger.data = data || null;
return logger;
}, {

pipe(stream) {
Expand Down
Loading

0 comments on commit f1c20a2

Please sign in to comment.