Details
Description
Hi,
When using XmlLayoutSchemaLog4j layout with .Net Core, the following exception appears:
{quote}System.ArgumentException: Invalid name character in 'log4j:event'. The ':' character, hexadecimal value 0x0x3A, cannot be included in a name.{quote}
I made a copy of XmlLayoutSchemaLog4j.cs in my sources, and found the culprit:
writer.WriteStartElement("log4j:event");
XmlWriter.WriteStartElement is called wrongly, the namespace should be a separate argument:
writer.WriteStartElement("event", "log4j");
I corrected all WriteStartElement in my copy, and it now works fine. I hope that you can put this small change in the next version.
Attachments
Issue Links
- is related to
-
LOG4NET-685 Broken XmlLayoutSchemaLog4j
- Resolved
- links to