mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04: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) {
|
||||
|
||||
Winston.log('info', 'logger is enable');
|
||||
const loggers = process.env.LOGGERS.split(',') || 'console';
|
||||
Winston.log('info', `Loggers selected : ${ process.env.LOGGERS }, if empty default is console`);
|
||||
if (process.env.LOGGERS) {
|
||||
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')) {
|
||||
Winston.add(Winston.transports.Console, {
|
||||
|
@ -58,6 +62,7 @@ Meteor.startup(() => {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
Winston.log('info', 'Logger is completly instanciate');
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue