Only log to console if process.stdout is available
This commit is contained in:
@@ -340,7 +340,7 @@ function logAtLevel(level: LogLevel, ...args: ReadonlyArray<unknown>) {
|
|||||||
if (globalLogger) {
|
if (globalLogger) {
|
||||||
const levelString = getLogLevelString(level);
|
const levelString = getLogLevelString(level);
|
||||||
globalLogger[levelString](cleanArgs(args));
|
globalLogger[levelString](cleanArgs(args));
|
||||||
} else if (isRunningFromConsole) {
|
} else if (isRunningFromConsole && !process.stdout.destroyed) {
|
||||||
console._log(...args);
|
console._log(...args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user