Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-553

DebugAppender configuration should give the possibility to disable outputting loggerName as category

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.7
    • 2.0.8
    • Appenders
    • None

    Description

      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:

      <appender name="DEBUG" type="log4net.Appender.DebugAppender">
          <outputCategory value="false"/>
          <layout type="log4net.Layout.PatternLayout">
      	  <conversionPattern value="%-5level: %message%newline"/>
          </layout>
        </appender>
      

      In my patch, the outputCategory parameter defaults to true, so the behavior doesnt change unless the new configuration is used.

      Attachments

        1. log4net-DebugAppenderCategory.patch
          18 kB
          Jean-Francois Beaulac
        2. log4net-DebugAppenderCategory2.patch
          18 kB
          Jean-Francois Beaulac
        3. log4net-DebugAppenderCategory3.patch
          11 kB
          Jean-Francois Beaulac
        4. OutputCategoryParam-DebugAppender.cs.patch
          2 kB
          Jean-Francois Beaulac

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            drake2k Jean-Francois Beaulac
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment