mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04: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');
|
||||
const fs = require('fs');
|
||||
|
||||
//remove default logger
|
||||
Winston.remove(Winston.transports.Console);
|
||||
const loggerEnable = process.env.LOGGER_ENABLE || false;
|
||||
if (loggerEnable) {
|
||||
|
||||
|
@ -15,9 +17,6 @@ Meteor.startup(() => {
|
|||
json: true,
|
||||
timestamp: true,
|
||||
});
|
||||
} else {
|
||||
//remove default logger
|
||||
Winston.remove(Winston.transports.Console);
|
||||
}
|
||||
|
||||
if (loggers.includes('file')) {
|
||||
|
@ -57,9 +56,6 @@ Meteor.startup(() => {
|
|||
Winston.log('info', `zulipconfig ${zulipConfig}`);
|
||||
}
|
||||
|
||||
} else {
|
||||
//remove default logger
|
||||
Winston.remove(Winston.transports.Console);
|
||||
}
|
||||
Winston.log('info', 'Logger is completly instanciate');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue