Maciej Stiller created LOG4NET-685:
--------------------------------------
Summary: Broken XmlLayoutSchemaLog4j in
Key: LOG4NET-685
URL: https://issues.apache.org/jira/browse/LOG4NET-685
Project: Log4net
Issue Type: Bug
Components: Layouts
Affects Versions: 2.0.14
Environment: Windows 11 Professional
.NET Framework 4.5.2
Reporter: Maciej Stiller
Attachments: configuration.xml
After updating from version 2.0.8 to 2.0.14, using XmlLayoutSchemaLog4j seems
to be broken resulting in a following error:
{noformat}
System.ArgumentException: Cannot set the namespace if Namespaces is 'false'.
at System.Xml.XmlTextWriter.WriteStartElement(String prefix, String
localName, String ns)
at log4net.Layout.XmlLayoutSchemaLog4j.FormatXml(XmlWriter writer,
LoggingEvent loggingEvent)
at log4net.Layout.XmlLayoutBase.Format(TextWriter writer, LoggingEvent
loggingEvent)
at log4net.Appender.AppenderSkeleton.RenderLoggingEvent(TextWriter writer,
LoggingEvent loggingEvent)
at log4net.Appender.TextWriterAppender.Append(LoggingEvent loggingEvent)
at log4net.Appender.FileAppender.Append(LoggingEvent loggingEvent)
at log4net.Appender.RollingFileAppender.Append(LoggingEvent
loggingEvent){noformat}
Configuration is initialized by executing XmlConfigurator, where Stream is
pointing to [^configuration.xml]
{code:java}
log4net.Config.XmlConfigurator.Configure(Stream configStream); {code}
After some digging I belive for it to be related to
[https://github.com/apache/logging-log4net/pull/18] which was introduces in
version 2.0.13 under Bug fixes section
--
This message was sent by Atlassian Jira
(v8.20.1#820001)