fix logger call
This commit is contained in:
parent
e9e64ac06f
commit
9582efbe65
|
@ -3,7 +3,7 @@ let fs = require('./fs.js');
|
|||
|
||||
class Logger {
|
||||
constructor(options) {
|
||||
this.events = options.events;
|
||||
this.events = options.events || {emit: function(){}};
|
||||
this.logLevels = ['error', 'warn', 'info', 'debug', 'trace'];
|
||||
this.logLevel = options.logLevel || 'info';
|
||||
this.logFunction = options.logFunction || console.log;
|
||||
|
|
|
@ -20,7 +20,7 @@ class Embark {
|
|||
let Config = require('./core/config.js');
|
||||
|
||||
this.events = new Events();
|
||||
this.logger = new Logger({logLevel: 'debug'});
|
||||
this.logger = new Logger({logLevel: 'debug', events: this.events});
|
||||
|
||||
this.config = new Config({env: env, logger: this.logger, events: this.events});
|
||||
this.config.loadConfigFiles(options);
|
||||
|
|
Loading…
Reference in New Issue