rearrange logging so message comes first in console

This commit is contained in:
Evan Morikawa 2016-11-23 12:01:47 -08:00
parent c05bc8ee63
commit eacbb99f15

View file

@ -12,9 +12,9 @@ function Logger(boundArgs = {}) {
if (_.isEmpty(boundArgs)) {
return console[logFn](first, ...args)
}
return console[logFn](boundArgs, first, ...args)
return console[logFn](first, ...args, boundArgs)
}
return console[logFn]({...boundArgs, ...first}, ...args)
return console[logFn](...args, {...boundArgs, ...first})
}
})
logger.child = (extraBoundArgs) => Logger({...boundArgs, ...extraBoundArgs})