fix for #419 - calling replace console outside of configure breaks things

This commit is contained in:
Gareth Jones 2016-11-09 07:50:56 +11:00
parent 93af09e864
commit 7368cd33dc

View File

@ -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(