-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Change default layout to include exceptions #1292
Comments
Thanks for reporting this! I agree the writing the exception on default is a good suggestion. But I'm doubting between |
I believe that |
After reading #1034, it seems that this is a better default ${longdate}|${level:uppercase=true}|${logger}|${message:withException=true} |
note:
suggested: (by @snakefoot - see #2503 (comment))
|
@snakefoot I see it was confused in #2503 with ExceptionLayoutRenderer.Separator I think #1292 (comment) is basically the same and more clear IMO |
But it always inserts |
Ow yes, you're right. Maybe we could add another renderer so it's clearer to communicate? Or do you think #1292 (comment) is easy to understand? (i'm afraid we have to explain it every time) |
My personal opinion is that this is much easier to the eye:
And is actually the Layout that I use normally use. But if NLog 5.0 is meant as minimal breaking changes, then it probably not that good. |
FYI We need to fix in NLog 5 that the exception isn't logged by default. That's an issue for ages. It's breaking and so this is the right moment |
If there aren't exceptions, then your suggestion is more backwards compatible (from #1292 (comment)) That's a +1 |
One could also consider changing
Other suggestion could be changing |
Sounds good to me!
Also interesting. Imo it's indeed a better default. I think it's important to have good defaults. |
@304NotModified Has this been resolved with #3458 ? (So part of NLog 5.0) |
Not yet. This is about the default for Layout |
The default layout should include a renderer for exceptions.
Relates to #1290 and #1291
The text was updated successfully, but these errors were encountered: