Fix missing warn in Loggers
This commit is contained in:
parent
343eaa85df
commit
941f671ed2
|
@ -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);
|
||||
|
|
|
@ -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;
|
Loading…
Reference in New Issue
Block a user