winston
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -148,3 +148,12 @@ /* | ||
output.level = options.level; | ||
output.message = options.message.stripColors; | ||
// | ||
// Remark (jcrugzz): This used to be output.message = options.message.stripColors. | ||
// I do not know why this is, it does not make sense but im handling that | ||
// case here as well as handling the case that does make sense which is to | ||
// make the `output.message = options.message` | ||
// | ||
output.message = options.message.stripColors | ||
? options.message.stripColors | ||
: options.message; | ||
return JSON.stringify(output); | ||
@@ -151,0 +160,0 @@ } |
{ | ||
"name": "winston", | ||
"description": "A multi-transport async logging library for Node.js", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"author": "Charlie Robbins <charlie.robbins@gmail.com>", | ||
@@ -6,0 +6,0 @@ "maintainers": [ |
@@ -20,2 +20,3 @@ /* | ||
defaultTransport = new (winston.transports.Console)(), | ||
rawTransport = new (winston.transports.Console)({ level: 'verbose', raw: true }), | ||
debugStdoutTransport = new (winston.transports.Console)({ debugStdout: true }), | ||
@@ -38,2 +39,3 @@ stderrLevelsTransport = new (winston.transports.Console)({ stderrLevels: ['info', 'warn'] }), | ||
"An instance of the Console Transport": { | ||
"with showLevel on": { | ||
@@ -116,2 +118,15 @@ topic : function() { | ||
}).addBatch({ | ||
'An instance of a raw Console transport': { | ||
'logging to stdout': { | ||
topic: function () { | ||
stdMocks.use(); | ||
rawTransport.log('verbose', 'hello there'); | ||
}, 'should output json with message property': function () { | ||
stdMocks.restore(); | ||
var output = stdMocks.flush(); | ||
assert.ok(output.stdout[0].indexOf('"message":"hello there"') > -1); | ||
} | ||
} | ||
} | ||
}).addBatch({ | ||
"An instance of the Console Transport with no options": { | ||
@@ -118,0 +133,0 @@ "should set stderrLevels to 'error' and 'debug' by default": helpers.assertStderrLevels( |
267221
6067