You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Dennis Lundberg (Jira)" <ji...@apache.org> on 2021/03/30 11:27:00 UTC

[jira] [Moved] (LOG4NET-663) Config "[%file:%line] %ndc" leads to unexpected output "[?:?] (null)"

     [ https://issues.apache.org/jira/browse/LOG4NET-663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg moved LOGGING-171 to LOG4NET-663:
-------------------------------------------------

                  Key: LOG4NET-663  (was: LOGGING-171)
    Affects Version/s:     (was: 2.0)
              Project: Log4net  (was: Commons Logging)

> Config "[%file:%line] %ndc" leads to unexpected output "[?:?] (null)"
> ---------------------------------------------------------------------
>
>                 Key: LOG4NET-663
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-663
>             Project: Log4net
>          Issue Type: Bug
>         Environment: dotnet --version
> 3.1.301
> Microsoft™ Windows© Server 2019 Standard
> Version 1809
> Bestriebssystembuild 17763.720
>            Reporter: Daniel Gschößer
>            Priority: Major
>
> Hello, I got an issue with "[%file:%line] %ndc".
> I assembled in my Program.cs
>  
> {code:java}
> [assembly: log4net.Config.XmlConfigurator(Watch = true, ConfigFile = "log4net.config")]{code}
> My log4net.config works pretty fine except the "[%file:%line] %ndc" settings.
> {code:java}
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
>     <configSections>
>         <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
>     </configSections>
>     <log4net>
>         <appender name="ConsoleAppender" type="log4net.Appender.ManagedColoredConsoleAppender" >
>             <layout type="log4net.Layout.PatternLayout">
>                 <conversionPattern value="%date %-5level %logger [%file:%line] %ndc - %message%newline" />
>             </layout>
>         </appender>
>         <root>
>             <level value="DEBUG" />
>             <appender-ref ref="ConsoleAppender" />
>         </root>
>     </log4net>
> </configuration>
> {code}
>  



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