using config file for logger level
This commit is contained in:
parent
9187a020d6
commit
24643f01dd
@ -22,13 +22,13 @@ Logger.add(Winston.transports.Console, {
|
||||
handleExceptions: true,
|
||||
});
|
||||
|
||||
// Set Logger message level priority for the console
|
||||
Logger.transports.console.level = 'info';
|
||||
|
||||
Meteor.startup(() => {
|
||||
const LOG_CONFIG = Meteor.settings.log || {};
|
||||
let filename = LOG_CONFIG.filename;
|
||||
|
||||
// Set Logger message level priority for the console
|
||||
Logger.transports.console.level = LOG_CONFIG.level;
|
||||
|
||||
// Determine file to write logs to
|
||||
if (filename) {
|
||||
if (Meteor.settings.runtime.env === 'development') {
|
||||
|
@ -1,2 +1,3 @@
|
||||
log:
|
||||
filename: '/log/development.log'
|
||||
level: 'info'
|
||||
|
Loading…
Reference in New Issue
Block a user