-
Notifications
You must be signed in to change notification settings - Fork 328
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
Update XmlLayoutSchemaLog4j.cs #18
Conversation
Use prefix and ns to play nice with XmlWriter
I re-made the edits as the previous commit had white-space issues. This one is much friendlier. |
We support this pull request. Without this bugfix, the layout does not work on Win .NET Core 3.1 platform (nothing is actually logged any more), so we had to take this bugfix into an own layout class and redirect our config files to that. Please merge this pull request! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accepting on the basis of formatting changes only; I don't personally know of the impact so take it on the grounds of the PR and supporting requests as part of an attempt to clean up outstanding pull requests
Please also note that this PR is against the develop branch which is in a state which I can't vouch for, so I've cherry-picked be299bc into master |
I highly doubt, that this PR should have been closed. I currently assume, that the RenderLoggingEvent method might have challenges to keep up with this change. |
I suspect this change is the reason we no longer get XML logs for our .NET framework services after upgrading from 2.0.12 to 2.0.14. Works for netcoreapp, net5 and net6. net48 and net461 (the ones I've tried with) results in blank xml files. |
@tobylo I've been looking into this as part of another issue - there's a similar situation in the "non-log4j" variant which I had to update for the test app I wrote to work against it since the test app is using dotnet 6. I have updates in the pipeline that use the merged behavior for the NETSTANDARD target only, reverting to the original behavior otherwise, which should solve the problem for both use-cases. This is an unfortunate case of dotnet breaking compatibility - older |
@fluffynuts We haven't noticed being affected by the other issues that were fixed in the .13 and .14 releases, so from our point of view, better roll forward with a proper fix when you have the time to work on it. But I think it should be added to the release notes that there's a known issue for the combination .net framework and xml log output. |
I agree that it would have been helpful to see a mention in the release notes, here. I took an educated guess to click on the link to this PR, and luckily, I was right. It was a good thing we have some unit/integration tests for our logging, as weird as that sounds. https://logging.apache.org/log4net/release/release-notes.html |
Use prefix and ns to play nice with XmlWriter