Add custom debug.formatArgs to remove timestamp prefix in logs
Fixes #490 See also: https://github.com/visionmedia/debug/issues/216
This commit is contained in:
6
box.js
6
box.js
@@ -4,6 +4,12 @@
|
|||||||
|
|
||||||
require('supererror')({ splatchError: true });
|
require('supererror')({ splatchError: true });
|
||||||
|
|
||||||
|
// remove timestamp from debug() based output
|
||||||
|
require('debug').formatArgs = function formatArgs() {
|
||||||
|
arguments[0] = this.namespace + ' ' + arguments[0];
|
||||||
|
return arguments;
|
||||||
|
};
|
||||||
|
|
||||||
var appHealthMonitor = require('./src/apphealthmonitor.js'),
|
var appHealthMonitor = require('./src/apphealthmonitor.js'),
|
||||||
async = require('async'),
|
async = require('async'),
|
||||||
config = require('./src/config.js'),
|
config = require('./src/config.js'),
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
|
|
||||||
require('supererror')({ splatchError: true });
|
require('supererror')({ splatchError: true });
|
||||||
|
|
||||||
|
// remove timestamp from debug() based output
|
||||||
|
require('debug').formatArgs = function formatArgs() {
|
||||||
|
arguments[0] = this.namespace + ' ' + arguments[0];
|
||||||
|
return arguments;
|
||||||
|
};
|
||||||
|
|
||||||
var assert = require('assert'),
|
var assert = require('assert'),
|
||||||
debug = require('debug')('box:janitor'),
|
debug = require('debug')('box:janitor'),
|
||||||
async = require('async'),
|
async = require('async'),
|
||||||
|
|||||||
@@ -25,6 +25,12 @@ exports = module.exports = {
|
|||||||
|
|
||||||
require('supererror')({ splatchError: true });
|
require('supererror')({ splatchError: true });
|
||||||
|
|
||||||
|
// remove timestamp from debug() based output
|
||||||
|
require('debug').formatArgs = function formatArgs() {
|
||||||
|
arguments[0] = this.namespace + ' ' + arguments[0];
|
||||||
|
return arguments;
|
||||||
|
};
|
||||||
|
|
||||||
var addons = require('./addons.js'),
|
var addons = require('./addons.js'),
|
||||||
appdb = require('./appdb.js'),
|
appdb = require('./appdb.js'),
|
||||||
apps = require('./apps.js'),
|
apps = require('./apps.js'),
|
||||||
|
|||||||
Reference in New Issue
Block a user