You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
msg: 'Message',
// don't really care how the rest is separated out
}
But I'm observing that in the output, I get the message squashed into the json data without a newline or anything: 'Message { json data }'
I've tried using something like this:
log.info({
msg: 'Message',
detail: {
// json data
}
});
But when I do that, 'msg' is blank for some unknown reason. I've looked at the docs but they don't seem to be clear on how to deal with this scenario, but you can see that logging say, an Error object, produces precisely the behavior I want. How can I do this with arbitrary data?
The text was updated successfully, but these errors were encountered:
Haha, so simple. I had forgotten about this, thanks for getting back.
This ordering is confusing because of the way message interpolation happens, e.g. log.info('foo %s', fooVal); I didn't even consider putting the message "last". It makes sense under consideration, though it still seems a bit awkward.
I'm trying to do something like this:
And I want the result to be something like this:
But I'm observing that in the output, I get the message squashed into the json data without a newline or anything:
'Message { json data }'
I've tried using something like this:
But when I do that, 'msg' is blank for some unknown reason. I've looked at the docs but they don't seem to be clear on how to deal with this scenario, but you can see that logging say, an Error object, produces precisely the behavior I want. How can I do this with arbitrary data?
The text was updated successfully, but these errors were encountered: