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

Log file will be override

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • 2.0.8
    • None
    • Appenders, Core
    • Windows server 2012 64bit

    Description

      <appendToFile value="true" />
      <maximumFileSize value="4MB" />
      <maxSizeRollBackups value="-1" />
      <rollingStyle value="Composite" />
      <countDirection value="1" />
      <staticLogFileName value="false" />

      <datePattern value="'Abc-'yyyyMMdd'.log'" />
      <preserveLogFileNameExtension value="true" />

      My log4net config as below, and I find some question should be enhancement.

      1. If  my datePatten Set Abc (1 capital letter), Log4net core may course override log file.
        Some user has same question(https://blog.gss.com.tw/index.php/2017/11/11/log4net/)
      2.  If the preserveLogFileNameExtension = true, when the Log create to 11th, it will override first file.
        (Example:Abc-20180820.0.log、20180820.1.log.....20180820.10.log、20180820.11.log..then  the log will override 20180820.1.log again..)

      Attachments

        1. Error.png
          25 kB
          Kevin Chang
        2. Question2.png
          28 kB
          Kevin Chang

        Issue Links

          Activity

            People

              nachbarslumpi Dominik Psenner
              don750421 Kevin Chang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: