Fix missing warn in Loggers

This commit is contained in:
Nicolas Dextraze 2019-11-01 11:10:16 -07:00
parent 343eaa85df
commit 941f671ed2
2 changed files with 9 additions and 3 deletions

View File

@ -26,6 +26,11 @@ FileLogger.prototype.info = function() {
fs.appendFileSync(this._filePath, line);
};
FileLogger.prototype.warn = function() {
var line = createLine('WARN', arguments, 0);
fs.appendFileSync(this._filePath, line);
};
FileLogger.prototype.error = function(e) {
var hasError = e instanceof Error;
var line = createLine('ERROR', arguments, hasError ? 1 : 0);
@ -36,4 +41,4 @@ FileLogger.prototype.error = function(e) {
};
module.exports = FileLogger;
module.exports = FileLogger;

View File

@ -1,7 +1,8 @@
function NoopLogger() {
}
NoopLogger.prototype.error = function() {};
NoopLogger.prototype.debug = function() {};
NoopLogger.prototype.info = function() {};
NoopLogger.prototype.warn = function() {};
NoopLogger.prototype.error = function() {};
module.exports = NoopLogger;
module.exports = NoopLogger;