Skip to content

Commit

Permalink
fix whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
todbot committed Jun 23, 2019
1 parent c1eddd8 commit 872fcdd
Showing 1 changed file with 37 additions and 36 deletions.
73 changes: 37 additions & 36 deletions app/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,43 @@ if( !logconfig.ignoredSources ) { logconfig.ignoredSources = []; }


var Logger = {
/**
* Log a message
*
* @method function
* @return {[type]} [description]
*/
msg: function(/* msg,msg,msg */) {
var iargs = arguments;
if( logconfig.showDebug ) {
var ignore = logconfig.ignoredSources.some( function(is) {
return iargs[0].toString().match(is) ;
});
if( ignore ) { return; }

var args = Array.prototype.slice.call(arguments);
// args.unshift( Math.floor(new Date().getTime()/1000) + ':');
args.unshift( new Date().getTime() + ':');
console.log.apply(console, args );
}
else {
// do nothing, but later, log to file?
}
// FIXME: log to file?
},
warn: function() {
var args = Array.prototype.slice.call(arguments);
args.unshift( Math.floor(new Date().getTime()/1000) + ':');
console.warn.apply(console, args);
// FIXME: log to file?
},
error: function() {
var args = Array.prototype.slice.call(arguments);
args.unshift( Math.floor(new Date().getTime()/1000) + ':');
console.error.apply(console, args);
// FIXME: log to file?
}
/**
* Log a message
*
* @method function
* @return {[type]} [description]
*/

msg: function(/* msg,msg,msg */) {
var iargs = arguments;
if( logconfig.showDebug ) {
var ignore = logconfig.ignoredSources.some( function(is) {
return iargs[0].toString().match(is) ;
});
if( ignore ) { return; }

var args = Array.prototype.slice.call(arguments);
// args.unshift( Math.floor(new Date().getTime()/1000) + ':');
args.unshift( new Date().getTime() + ':');
console.log.apply(console, args );
}
else {
// do nothing, but later, log to file?
}
// FIXME: log to file?
},
warn: function() {
var args = Array.prototype.slice.call(arguments);
args.unshift( Math.floor(new Date().getTime()/1000) + ':');
console.warn.apply(console, args);
// FIXME: log to file?
},
error: function() {
var args = Array.prototype.slice.call(arguments);
args.unshift( Math.floor(new Date().getTime()/1000) + ':');
console.error.apply(console, args);
// FIXME: log to file?
}
};

module.exports = Logger;

0 comments on commit 872fcdd

Please sign in to comment.