Don't care about logInFile + save all loggers opt

This commit is contained in:
Guillaume Wuip 2014-10-29 11:26:49 +01:00
parent 2598c9985c
commit f8bde051ac

View file

@ -179,7 +179,6 @@
*
* @param {Object} opt Optional default options for all loggers.
* @param {Boolean} opt.logInConsole Should all loggers print to console by default ? Default true.
* @param {Boolean} opt.logInFile Should all loggers saver log in file by default ? Default true.
*
* @param {int} opt.contextMediumSize Medium size of the context part of a log message.
* Used when calculating indent. Default to 45.
@ -211,7 +210,6 @@
*/
this.opt = {
logInConsole : opt.logInConsole !== false,
logInFile : opt.logInFile !== false,
contextMediumSize : opt.contextMediumSize || 45,
spaceSize : opt.spaceSize || 4,
@ -279,6 +277,13 @@
return this;
};
/**
* loggers
*
* Stores loggers infos
* @type {Object}
*/
this.loggers = {};
};
@ -473,7 +478,6 @@
* @param {Array|String} opt.lineColors Default colors output for line number. Default undefined.
*
* @param {Boolean} opt.logInConsole Should the logger print to the console ?
* @param {Boolean} opt.logInFile If the log should be save in file.
* @param {Boolean} opt.alwaysTags Always print tags (even without tag() )
* @param {Boolean} opt.alwaysLocation Always print location (even without file() )
* @param {Boolean} opt.alwaysTime Always print time (even without time() )
@ -500,7 +504,6 @@
opt.lineColors = opt.lineColors || this.opt.lineColors;
opt.logInConsole = opt.logInConsole || this.opt.logInConsole;
opt.logInFile = opt.logInFile || this.opt.logInFile;
opt.alwaysTags = opt.alwaysTags || this.opt.alwaysTags;
opt.alwaysLocation = opt.alwaysLocation || this.opt.alwaysLocation;
opt.alwaysTime = opt.alwaysTime || this.opt.alwaysTime;
@ -549,6 +552,7 @@
this.emit('newLogger', name, opt);
this.loggers[name] = opt;
};
//Keep the old console