You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Stefan Bodewig (JIRA)" <ji...@apache.org> on 2017/03/07 19:27:38 UTC

[jira] [Resolved] (LOG4NET-553) DebugAppender configuration should give the possibility to disable outputting loggerName as category

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

Stefan Bodewig resolved LOG4NET-553.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.8

Many thanks, Jean-Francois, I've committed you patch. I had to slightly amend it to exclude the tests in .NET Standard again as there is no {{Listeners}} property on {{Debug}} there.


> DebugAppender configuration should give the possibility to disable outputting loggerName as category
> ----------------------------------------------------------------------------------------------------
>
>                 Key: LOG4NET-553
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-553
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Appenders
>    Affects Versions: 2.0.7
>            Reporter: Jean-Francois Beaulac
>             Fix For: 2.0.8
>
>         Attachments: log4net-DebugAppenderCategory2.patch, log4net-DebugAppenderCategory3.patch, log4net-DebugAppenderCategory.patch, OutputCategoryParam-DebugAppender.cs.patch
>
>
> The DebugAppender always uses the {{System.Diagnostics.Debug.Write(string,string)}} overload passing in the loggername as the category parameter.
> It should be possible to omit the category parameter if having the loggername as category is not desired.
> Attached is a patch implementing the desired new feature, which would be activated by configuration:
> {code:xml}
> <appender name="DEBUG" type="log4net.Appender.DebugAppender">
>     <outputCategory value="false"/>
>     <layout type="log4net.Layout.PatternLayout">
> 	  <conversionPattern value="%-5level: %message%newline"/>
>     </layout>
>   </appender>
> {code}
> In my patch, the outputCategory parameter defaults to true, so the behavior doesnt change unless the new configuration is used.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)