Only log to console if process.stdout is available
This commit is contained in:
parent
20be8a11fe
commit
a5f44bc46c
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue