From d3929226a8637fcafa2ad18e77beb0d131fc1b87 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Sat, 27 Sep 2014 21:04:14 -0700 Subject: [PATCH] Fix 'make check' --- lib/bunyan.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/bunyan.js b/lib/bunyan.js index c38f102..2754eba 100644 --- a/lib/bunyan.js +++ b/lib/bunyan.js @@ -829,15 +829,17 @@ function mkLogEmitter(minLevel) { if (args[0] instanceof Error) { // `log.(err, ...)` fields = { - // if a serializer is defined for err use it else fallback on the default serializer - err: log.serializers.err ? log.serializers.err(args[0]) : Logger.stdSerializers.err(args[0]) + // Use this Logger's err serializer, if defined. + err: (log.serializers.err + ? log.serializers.err(args[0]) + : Logger.stdSerializers.err(args[0])) }; excludeFields = {err: true}; if (args.length === 1) { msgArgs = [fields.err.message]; } else { msgArgs = Array.prototype.slice.call(args, 1); - } + } } else if (typeof (args[0]) !== 'object' && args[0] !== null || Array.isArray(args[0])) { // `log.(msg, ...)`