debug-logger
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -7,2 +7,4 @@ 'use strict'; | ||
exports.inspectOptions = {}; | ||
var DEBUG_NAMESPACE = ':debug'; | ||
@@ -55,3 +57,3 @@ var RED = '\x1b[31m'; | ||
} | ||
errorStrings[1] = 'Inspected object:\n' + util.inspect(e); | ||
errorStrings[1] = 'Inspected object:\n' + util.inspect(e, exports.inspectOptions); | ||
return errorStrings; | ||
@@ -61,3 +63,3 @@ }; | ||
function getPadding(size){ | ||
return new Array(size).join(' '); | ||
return new Array(size+1).join(' '); | ||
} | ||
@@ -68,3 +70,3 @@ | ||
var debug = vmDebug(namespace + DEBUG_NAMESPACE); | ||
var defaultPadding = '\n' + getPadding(namespace.length + DEBUG_NAMESPACE.length + 11); | ||
var defaultPadding = '\n' + getPadding(2); | ||
@@ -71,0 +73,0 @@ var logger = { |
@@ -27,2 +27,5 @@ var log = require('../debug-logger')('myapp'); | ||
var customColorLog = require('../debug-logger')('myapp'); | ||
customColorLog.info("I'm a RED info output"); | ||
customColorLog.info("I'm a RED info output"); | ||
debugLogger.inspectOptions = { colors: true }; // Check http://nodejs.org/api/util.html#util_util_inspect_object_options | ||
log.info('nice colored example:', { anumber: 1234, astring: 'str', adate: new Date(), aboolean: true }); |
{ | ||
"name": "debug-logger", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "A wrapper for visionmedia's debug logger", | ||
@@ -5,0 +5,0 @@ "main": "debug-logger.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6002
98