Skip to content

Commit

Permalink
fix(scope): log method should be an alias of info, fixes #443
Browse files Browse the repository at this point in the history
  • Loading branch information
megahertz committed Nov 25, 2024
1 parent 8f77007 commit 14a8ecd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ function scopeFactory(logger) {
scope.maxLabelLength = Math.max(scope.maxLabelLength, label.length);

const newScope = {};
for (const level of [...logger.levels, 'log']) {
for (const level of logger.levels) {
newScope[level] = (...d) => logger.logData(d, { level, scope: label });
}
newScope.log = newScope.info;
return newScope;
}
}

0 comments on commit 14a8ecd

Please sign in to comment.