You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That would ease debugging when it is convenient to log data into stream and to console at the same time.
change log.js:23 var Log = exports = module.exports = function Log(level, stream, bReflectToConsole){
then add a following line after assigning of this.stream : this.reflect2console = (this.stream === process.stdout ? false : !!bReflectToConsole);
refactor log function in log.js:146 to
log: function(levelStr, msg) {
if (exports[levelStr] <= this.level) {
var s = '[' + new Date().toUTCString() + ']'
+ ' ' + levelStr
+ ' ' + msg;
this.stream.write(s+ '\n');
if (this.reflect2console) console.log(s);
}
},
The text was updated successfully, but these errors were encountered:
Because you will lose all stdout as soon as you close terminal, but you won't lose a log file. Console logging is only supplemental feature for file logging, for use "with", not "instead".
That would ease debugging when it is convenient to log data into stream and to console at the same time.
change log.js:23
var Log = exports = module.exports = function Log(level, stream, bReflectToConsole){
then add a following line after assigning of
this.stream
:this.reflect2console = (this.stream === process.stdout ? false : !!bReflectToConsole);
refactor log function in log.js:146 to
The text was updated successfully, but these errors were encountered: