-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Message is not parsed from Log2Console when Exception is logged #45
Comments
Hi and welcome to Serilog.Sinks.Udp! It looks like you've found a bug, I will look into this issue tonight, it seems that it should be easy to reproduce. Thank you for reporting it! |
Due to your detailed description I had no problems finding the issue. I was not escaping XML characters ( I'm in the process of merging the fix to master, and will then start working towards a release. Thank you for reporting the issue! |
Correctly XML escape exception message serialized by `Log4jTextFormatter`. Closes #45
It will take some time for an official version with your fix to be released. If you are being blocked, I would recommend you to copy the code found in Log4jTextFormatter, renaming the class to |
Thanks for the very fast fix and the proposed workaround until the new release. Glad I could help :) |
There is a new pre-release available on www.nuget.org, with a fix for your issue. Would you be able to validate that the formatter in the pre-release works as expected? You will have to make some changes to your configuration of the UDP sink, please see the migration instructions here. |
This works as expected, thank you :) |
Perfect! I will have to await confirmation from another user before I release a new official version, but I hope it shouldn't take that long, unless he has vacation, but then I'll release the new version anyway. Thanks for the support! Keep up the good work! |
Release v6.0.0 is now live on nuget.org. Thank you for reporting the issue! |
I'm using .NET Core and have configured Serilog as follow:
With
appsettings.json
:So everything works fine and my logs appear correctly in Log2Console when I do something like that:
But when I change the code to the following, then the message in Log2Console is not parsed correctly.
in Log2Console I see the following message, marked an Info:
I'm using .NET Core 2.2 with Serilog 2.1.1 and Serilog.Sinks.Udp 5.0.1.
Am I missing something on the configuration or is there something wrong in the pattern?
Thanks for looking into it and best regards,
Kevin
The text was updated successfully, but these errors were encountered: