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,
|
handleExceptions: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set Logger message level priority for the console
|
|
||||||
Logger.transports.console.level = 'info';
|
|
||||||
|
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
const LOG_CONFIG = Meteor.settings.log || {};
|
const LOG_CONFIG = Meteor.settings.log || {};
|
||||||
let filename = LOG_CONFIG.filename;
|
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
|
// Determine file to write logs to
|
||||||
if (filename) {
|
if (filename) {
|
||||||
if (Meteor.settings.runtime.env === 'development') {
|
if (Meteor.settings.runtime.env === 'development') {
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
log:
|
log:
|
||||||
filename: '/log/development.log'
|
filename: '/log/development.log'
|
||||||
|
level: 'info'
|
||||||
|
Loading…
Reference in New Issue
Block a user