-
-
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
Log4netTextFormatter does not escape message containing XML #51
Comments
Thanks! I'll look into this tonight, but I am currently on holiday and won't probably release a new version until the weekend. Will you be able to work around the issue? |
Yes, no problem. |
Correctly XML escape exception all properties serialized by `Log4jTextFormatter` and `Log4netTextFormatter`. Closes #51
Correctly XML escape all properties serialized by `Log4jTextFormatter` and `Log4netTextFormatter`. Closes #51
Correctly XML escape all properties serialized by `Log4jTextFormatter` and `Log4netTextFormatter`. Closes #51
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 pre-release works as you'd expect? You will have to make some changes to your configuration of the UDP sink, please see the migration instructions here. |
I tried it and confirmed that it works. |
Release v6.0.0 is now live on nuget.org. Thank you for reporting the issue! |
If you want to add it to your documentation, this is how you configure the sink in app.config settings:
|
Thanks! I've updated the readme with your provided configuration. Best wishes to you on your coding journey! |
Describe the bug
The Log4netTextFormatter does not escape a log message containing XML special characters. For example,
will result in XML like:
Tools attempting to parse the XML will fail.
Expected behavior
The XML should be escaped, as in:
Additional context
I'm using a customized version of Sentinel as the log reader (https://github.com/mkb137/Sentinel)
The text was updated successfully, but these errors were encountered: