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 "Ron Grabowski (JIRA)" <ji...@apache.org> on 2008/01/01 01:13:43 UTC
[jira] Commented: (LOG4NET-106) TraceAppender : Add switch to
disable using logger name as trace category
[ https://issues.apache.org/jira/browse/LOG4NET-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12555160 ]
Ron Grabowski commented on LOG4NET-106:
---------------------------------------
r607786 doesn't address how to pass in a null category. This may work:
<category value="" />
but its probably better to explicitly express the desire to call a Trace.Write overload by using this syntax:
<useCategory value="false" />
> TraceAppender : Add switch to disable using logger name as trace category
> -------------------------------------------------------------------------
>
> Key: LOG4NET-106
> URL: https://issues.apache.org/jira/browse/LOG4NET-106
> Project: Log4net
> Issue Type: Improvement
> Components: Appenders
> Affects Versions: 1.2.9
> Reporter: Chi Lang
> Assignee: Ron Grabowski
> Priority: Trivial
>
> TraceAppender now always put logger name as trace category when writing to System.Diagnostics.Trace.Write
> ie. :
> System.Diagnostics.Trace.Write(RenderLoggingEvent(loggingEvent), loggingEvent.LoggerName);
> This resulted in logger's name appearing twice in Trace logs if once use/share the same conversion for both file-based and trace appenders, eg.
> "%date [%thread] %-5level %logger - %message%"
> It would be nice to have a settable property on TraceAppender to disable using logger's name as trace category, ie. :
> public bool UseLoggerNameAsTraceCategory
> {
> get; set;
> }
> ...
> if (m_useLoggerNameAsTraceCategory)
> {
> System.Diagnostics.Trace.Write(RenderLoggingEvent(loggingEvent), loggingEvent.LoggerName);
> }
> else
> {
> System.Diagnostics.Trace.Write(RenderLoggingEvent(loggingEvent), null);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.