Skip to content

Commit

Permalink
🐛 logging: temporary fix for info,warn and debug logging (#7533)
Browse files Browse the repository at this point in the history
- GhostLogging always expected an stdout stream
- so it was not possible to use production env with GhostLogger, because an error was happening
- temporary fix!
  • Loading branch information
kirrg001 authored and ErisDS committed Oct 10, 2016
1 parent 64ac53c commit 29a48d0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/server/logging/GhostLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ GhostLogger.prototype.info = function info() {
print += ' ';
});

if (!this.loggers.stdout) {
return;
}

this.loggers.stdout.log.info(print);
};

Expand All @@ -184,10 +188,18 @@ GhostLogger.prototype.warn = function warn() {
print += ' ';
});

if (!this.loggers.stdout) {
return;
}

this.loggers.stdout.log.warn(print);
};

GhostLogger.prototype.debug = function debug(options) {
if (!this.loggers.stdout) {
return;
}

this.loggers.stdout.log.debug(options);
};

Expand Down

0 comments on commit 29a48d0

Please sign in to comment.