mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Fix bug when LOGGER is enabled, but LOGGERS is empty.
This commit is contained in:
parent
7f8f6bf3db
commit
b03c9b9879
1 changed files with 7 additions and 2 deletions
|
|
@ -10,8 +10,12 @@ Meteor.startup(() => {
|
||||||
if (loggerEnable) {
|
if (loggerEnable) {
|
||||||
|
|
||||||
Winston.log('info', 'logger is enable');
|
Winston.log('info', 'logger is enable');
|
||||||
const loggers = process.env.LOGGERS.split(',') || 'console';
|
if (process.env.LOGGERS) {
|
||||||
Winston.log('info', `Loggers selected : ${ process.env.LOGGERS }, if empty default is console`);
|
const loggers = process.env.LOGGERS.split(',') || 'console';
|
||||||
|
Winston.log('info', `Loggers selected : ${ process.env.LOGGERS }, if empty default is console`);
|
||||||
|
} else {
|
||||||
|
const loggers = 'console';
|
||||||
|
}
|
||||||
|
|
||||||
if (loggers.includes('console')) {
|
if (loggers.includes('console')) {
|
||||||
Winston.add(Winston.transports.Console, {
|
Winston.add(Winston.transports.Console, {
|
||||||
|
|
@ -58,6 +62,7 @@ Meteor.startup(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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