-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Do Not Concatenate Error Message When An Error Stack is Present #1664
base: master
Are you sure you want to change the base?
Conversation
Fix note to ensure that the message will not be concatenated when a `stack` property is available.
Any progress on this? I don't like the concatenated message for errors. This would be great! |
In the meantime, I wrote a formatter that can be used as a workaround: #1660 (comment) |
@codyzu I fixed the failing tests, so all that should be left is getting approval for this change. |
@DABH Would you be able to look at this when you get a chance? Thanks! |
Has this been fixed in another commit? Or why is this not merged? |
Any reason not to include this? Thanks |
Hi there! Sorry, with essentially no funding for winston it's been hard to keep up with PRs beyond maintenance. Can someone provide an example of current behavior and behavior with the proposed change? I'm worried that this is a breaking change and would require a major version bump. Maybe that's what we should do, but would like to hear from folks on that. Or maybe I'm misunderstanding and this isn't a breaking change. I recall that a lot of folks had issues with the way Thank you for your contribution and for perhaps years of patience on this issue... 🥲 |
(Of course, this branch would be have to be brought up to date as well or a new/equivalent PR be opened...) |
Fixes: #1660
Normally, the functionality described to concatenate the
message
properties of additionalmeta
objects makes sense. However, when themeta
object is anError
, this does not make sense: a customprintf
that prints the stack will double-print theError.message
as it is by default included in theError.stack
.Example:
Therefore, if a
stack
property exists in the meta object, do not append themessage
to the initialmessage
.Related:
#1338