diff --git a/lib/loglevel.js b/lib/loglevel.js index 469069e..307ab2f 100644 --- a/lib/loglevel.js +++ b/lib/loglevel.js @@ -264,7 +264,7 @@ } // NOTE: in v2, this should call rebuild(), which updates children. - return replaceLoggingMethods.call(this); + return replaceLoggingMethods.call(self); }; self.setDefaultLevel = function (level) { @@ -277,7 +277,7 @@ self.resetLevel = function () { userLevel = null; clearPersistedLevel(); - replaceLoggingMethods.call(this); + replaceLoggingMethods.call(self); }; self.enableAll = function(persist) { @@ -292,7 +292,7 @@ if (defaultLogger !== self) { inheritedLevel = normalizeLevel(defaultLogger.getLevel()); } - replaceLoggingMethods.call(this); + replaceLoggingMethods.call(self); if (defaultLogger === self) { for (var childName in _loggersByName) { @@ -309,7 +309,7 @@ if (initialLevel != null) { userLevel = normalizeLevel(initialLevel); } - replaceLoggingMethods.call(this); + replaceLoggingMethods.call(self); } /*