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

log4net 2.0.7 and greater doesn't log %message pattern

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.0.7, 2.0.8
    • Fix Version/s: 1.2.15
    • Component/s: Appenders
    • Labels:
      None
    • Environment:
      Windows XP SP3 Home Edition

      Description

      When we are updated log4net from 1.2.15 to 2.0.7 some of our customers report about wrong logging in RollingFileAppender.
      Log file looks like:
      2017-03-07 05:45:23,250 [1] WARN Driver [2017-03-07 05:45:32,718 [1] INFO Driver [2017-03-07 05:45:36,515 [1] INFO Driver [2017-03-07 05:45:37,843 [1] INFO Driver [2017-03-07 05:45:37,875 [1] INFO Driver [2017-03-07 05:45:38,125 [1] INFO WebcashClient [2017-03-07 05:45:40,828 [7] INFO Driver [2017-03-07 05:45:40,937 [7] INFO Driver [2017-03-07 05:45:41,093 [7] INFO Driver [2017-03-07 05:45:41,296 [7] INFO Driver [2017-03-07 05:45:41,328 [7] INFO Driver [2017-03-07 05:45:41,328 [7] INFO Driver [2017-03-07 05:45:41,343 [7] INFO Driver [2017-03-07 05:45:41,343 [7] INFO Driver [2017-03-07 05:45:41,375 [7] INFO Driver [2017-03-07 05:45:41,375 [7] INFO Driver [2017-03-07 05:45:41,531 [7] INFO Driver [2017-03-07 05:45:41,531 [7] INFO Driver [2017-03-07 05:45:41,562 [6] INFO Driver [2017-03-07 05:45:41,562 [6] INFO Driver [2017-03-07 05:45:41,578 [6] INFO Driver [2017-03-07 05:45:41,578 [6] INFO Driver [2017-03-07 05:45:41,593 [6] INFO Driver [2017-03-07 05:45:41,593 [6] INFO Driver [2017-03-07 05:45:41,609 [6] INFO Driver [2017-03-07 05:45:41,609 [6] INFO Driver [2017-03-07 05:45:41,625 [6] INFO Driver [2017-03-07 05:45:41,625 [6] INFO Driver [2017-03-07 05:45:41,640 [1] INFO WebcashClient [2017-03-07 05:45:41,781 [6] INFO Driver [2017-03-07 05:45:41,781 [6] INFO Driver [2017-03-07 05:45:41,859 [6] ...
      As I understood it can't handle "[%property

      {NDC}] - %message%newline" pattern.


      Appender configuration:
      <appender name="Driver" type="log4net.Appender.RollingFileAppender">
      <file value="Driver" />
      <appendToFile value="true" />
      <encoding value="utf-8" />
      <rollingStyle value="Date" />
      <datePattern value="_yyyy-MM-dd'.log'" />
      <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}

      ] - %message%newline" />
      </layout>
      <threshold value="DEBUG" />
      </appender>

        Attachments

        1. ConsoleApp1.zip
          3.69 MB
          Georgi Zhelezarov
        2. image-2018-06-06-15-10-06-024.png
          46 kB
          Varlamov Oleg

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              os.varlamov Varlamov Oleg
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: