Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/winston/create-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DerivedLogger extends Logger {
// Define prototype methods for each log level
// e.g. logger.log('info', msg) <––> logger.info(msg) & logger.isInfoEnabled()
// this is not an arrow function so it'll always be called on the instance instead of a fixed place in the prototype chain.
this[level] = function (...args) {
this[level] = (...args) => {
// Optimize the hot-path which is the single object.
if (args.length === 1) {
const [msg] = args;
Expand Down