Comparing version 1.1.3 to 1.1.4
@@ -73,4 +73,6 @@ "use strict"; | ||
var makePrefixWrappedLogger = function( logger, level ) | ||
var makePrefixWrappedLogger = function( logger, level, internalExtra ) | ||
{ | ||
internalExtra = internalExtra || { }; | ||
return function( ) | ||
@@ -98,2 +100,5 @@ { | ||
for ( var key in internalExtra ) | ||
internal[ key ] = internalExtra[ key ]; | ||
function parseError( err ) | ||
@@ -133,7 +138,15 @@ { | ||
if ( args.length > 0 && args[ 0 ] && args[ 0 ] instanceof Sequence ) | ||
if ( | ||
args.length > 0 && | ||
args[ 0 ] && | ||
args[ 0 ] instanceof Sequence | ||
) | ||
{ | ||
internal.sequence = args.shift( ); | ||
if ( args.length > 0 && args[ 0 ] && args[ 0 ] instanceof Sequencer.Direction ) | ||
if ( | ||
args.length > 0 && | ||
args[ 0 ] && | ||
args[ 0 ] instanceof Sequencer.Direction | ||
) | ||
internal.sequenceDirection = args.shift( ); | ||
@@ -197,7 +210,13 @@ } | ||
out.json = makePrefixWrappedLogger( | ||
logger.info, 'info', { json: true } ); | ||
for ( var key in logger ) | ||
{ | ||
if ( logger.hasOwnProperty( key ) && logger[key] instanceof Function ) | ||
if ( | ||
logger.hasOwnProperty( key ) && | ||
logger[ key ] instanceof Function | ||
) | ||
{ | ||
out[key] = makePrefixWrappedLogger( logger[key], key ); | ||
out[ key ] = makePrefixWrappedLogger( logger[ key ], key ); | ||
} | ||
@@ -204,0 +223,0 @@ } |
@@ -21,2 +21,6 @@ "use strict"; | ||
{ | ||
if ( meta.internal.json ) | ||
// Don't print pure-json logs to the console | ||
return next( ); | ||
var options = { prettyPrint: true, colorized: meta.internal.colors }; | ||
@@ -23,0 +27,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"author": "Gustaf Räntilä <g.rantila@gmail.com>", | ||
@@ -8,0 +8,0 @@ "repository": { |
40355
1302