Fix 'make check'

This commit is contained in:
Trent Mick 2014-09-27 21:04:14 -07:00
parent bc49f14cfa
commit d3929226a8

View file

@ -829,15 +829,17 @@ function mkLogEmitter(minLevel) {
if (args[0] instanceof Error) { if (args[0] instanceof Error) {
// `log.<level>(err, ...)` // `log.<level>(err, ...)`
fields = { fields = {
// if a serializer is defined for err use it else fallback on the default serializer // Use this Logger's err serializer, if defined.
err: log.serializers.err ? log.serializers.err(args[0]) : Logger.stdSerializers.err(args[0]) err: (log.serializers.err
? log.serializers.err(args[0])
: Logger.stdSerializers.err(args[0]))
}; };
excludeFields = {err: true}; excludeFields = {err: true};
if (args.length === 1) { if (args.length === 1) {
msgArgs = [fields.err.message]; msgArgs = [fields.err.message];
} else { } else {
msgArgs = Array.prototype.slice.call(args, 1); msgArgs = Array.prototype.slice.call(args, 1);
} }
} else if (typeof (args[0]) !== 'object' && args[0] !== null || } else if (typeof (args[0]) !== 'object' && args[0] !== null ||
Array.isArray(args[0])) { Array.isArray(args[0])) {
// `log.<level>(msg, ...)` // `log.<level>(msg, ...)`