mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 16:00:13 +01:00
Fix add logger bug
In case you want to have only the console, it will fail at the `Winston.add` as it is already there.
This commit is contained in:
parent
fbf97d31a0
commit
4ffe9438e0
1 changed files with 2 additions and 6 deletions
|
|
@ -3,6 +3,8 @@ Meteor.startup(() => {
|
||||||
require('winston-zulip');
|
require('winston-zulip');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
|
//remove default logger
|
||||||
|
Winston.remove(Winston.transports.Console);
|
||||||
const loggerEnable = process.env.LOGGER_ENABLE || false;
|
const loggerEnable = process.env.LOGGER_ENABLE || false;
|
||||||
if (loggerEnable) {
|
if (loggerEnable) {
|
||||||
|
|
||||||
|
|
@ -15,9 +17,6 @@ Meteor.startup(() => {
|
||||||
json: true,
|
json: true,
|
||||||
timestamp: true,
|
timestamp: true,
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
//remove default logger
|
|
||||||
Winston.remove(Winston.transports.Console);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loggers.includes('file')) {
|
if (loggers.includes('file')) {
|
||||||
|
|
@ -57,9 +56,6 @@ Meteor.startup(() => {
|
||||||
Winston.log('info', `zulipconfig ${zulipConfig}`);
|
Winston.log('info', `zulipconfig ${zulipConfig}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
//remove default logger
|
|
||||||
Winston.remove(Winston.transports.Console);
|
|
||||||
}
|
}
|
||||||
Winston.log('info', 'Logger is completly instanciate');
|
Winston.log('info', 'Logger is completly instanciate');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue