fix logger call

This commit is contained in:
Iuri Matias 2018-03-15 17:18:20 -04:00
parent e9e64ac06f
commit 9582efbe65
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);