8000 fix for #419 - calling replace console outside of configure breaks th… · bing4git/log4js-node@7368cd3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7368cd3

Browse files
author
Gareth Jones
committed
fix for log4js-node#419 - calling replace console outside of configure breaks things
1 parent 93af09e commit 7368cd3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/log4js.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,12 @@ function loadConfigurationFile(filename) {
302302
function configureOnceOff(config, options) {
303303
if (config) {
304304
try {
305+
restoreConsole();
305306
configureLevels(config.levels);
306307
configureAppenders(config.appenders, options);
307308

308309
if (config.replaceConsole) {
309310
replaceConsole();
310-
} else {
311-
restoreConsole();
312311
}
313312
} catch (e) {
314313
throw new Error(

0 commit comments

Comments
 (0)
0