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

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

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.7
    • Fix Version/s: 2.0.8
    • Component/s: Appenders
    • Labels:
      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. OutputCategoryParam-DebugAppender.cs.patch
          2 kB
          Jean-Francois Beaulac
        2. log4net-DebugAppenderCategory.patch
          18 kB
          Jean-Francois Beaulac
        3. log4net-DebugAppenderCategory2.patch
          18 kB
          Jean-Francois Beaulac
        4. log4net-DebugAppenderCategory3.patch
          11 kB
          Jean-Francois Beaulac

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              drake2k Jean-Francois Beaulac
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: