mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
fix for #419 - calling replace console outside of configure breaks things
This commit is contained in:
parent
93af09e864
commit
7368cd33dc
@ -302,13 +302,12 @@ function loadConfigurationFile(filename) {
|
||||
function configureOnceOff(config, options) {
|
||||
if (config) {
|
||||
try {
|
||||
restoreConsole();
|
||||
configureLevels(config.levels);
|
||||
configureAppenders(config.appenders, options);
|
||||
|
||||
if (config.replaceConsole) {
|
||||
replaceConsole();
|
||||
} else {
|
||||
restoreConsole();
|
||||
}
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user