You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/10/25 09:58:00 UTC

[jira] [Work logged] (LOG4NET-586) XmlLayoutSchemaLog4j throws exception under .Net Core

     [ https://issues.apache.org/jira/browse/LOG4NET-586?focusedWorklogId=669431&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-669431 ]

ASF GitHub Bot logged work on LOG4NET-586:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Oct/21 09:57
            Start Date: 25/Oct/21 09:57
    Worklog Time Spent: 10m 
      Work Description: fluffynuts closed pull request #22:
URL: https://github.com/apache/logging-log4net/pull/22


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 669431)
    Remaining Estimate: 0h
            Time Spent: 10m

> XmlLayoutSchemaLog4j throws exception under .Net Core
> -----------------------------------------------------
>
>                 Key: LOG4NET-586
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-586
>             Project: Log4net
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.0.8
>         Environment: .Net Core 1.1 on Windows
>            Reporter: Pierre-Yann Bridé
>            Priority: Major
>             Fix For: 2.1.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hi,
> When using XmlLayoutSchemaLog4j layout with .Net Core, the following exception appears:
> {code:java}
> {quote}System.ArgumentException: Invalid name character in 'log4j:event'. The ':' character, hexadecimal value 0x0x3A, cannot be included in a name.{quote}
> {code}
> I made a copy of XmlLayoutSchemaLog4j.cs in my sources, and found the culprit:
> {code:java}
> writer.WriteStartElement("log4j:event");
> {code}
> XmlWriter.WriteStartElement is called wrongly, the namespace should be a separate argument:
> {code:java}
> writer.WriteStartElement("event", "log4j");
> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)