-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error format doesn't work when including metadata #87
Comments
For anyone having the same issue, here's my workaround:
|
I think I ran into the same thing @filetvignon. I've opened a PR for what I think is a quick fix #92 |
Any updates on this issue? It has been open since May 2019 and the actual issue still exists in the latest versions of winston & logform. |
I'm using the 'Errors' format and pipelining it through a custom printf format.
Basically I'm having enormous inconsistencies when I try to log my error with some metadata.
So
logger.info(err)
works fine, butlogger.info(err, someMetaData)
fails to give me the message or the stack, they both come as undefined when I log the "info" object that's coming in my custom format function.What's more, this only happens if I DID NOT set a message for the Error in ins constructor, even if it's just an empty string.
So in summary, this gives me a headache:
But these work::
Currently, I'm using this configuration for my logger:
Is there something wrong with my configuration?
The text was updated successfully, but these errors were encountered: