using config file for logger level

This commit is contained in:
KDSBrowne 2016-12-01 08:15:57 -08:00
parent 9187a020d6
commit 24643f01dd
2 changed files with 4 additions and 3 deletions

View File

@ -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') {

View File

@ -1,2 +1,3 @@
log:
filename: '/log/development.log'
level: 'info'