You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2010/03/25 15:32:18 UTC

DO NOT REPLY [Bug 48986] New: RollingFileAppender.rollOver() calls this.setFile with wrong append parameter

https://issues.apache.org/bugzilla/show_bug.cgi?id=48986

           Summary: RollingFileAppender.rollOver() calls this.setFile with
                    wrong append parameter
           Product: Log4j
           Version: 1.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: ommadawn_1975@yahoo.com


I don't understand the reason why the RollingFileAppender.rollOver() method
calls this.setFile() with two different "append" values, ignoring the
appender's configured fileAppend property.

  First case, if last rename did not succeed (with value true):

      if (!renameSucceeded) {
          try {
            this.setFile(fileName, true, bufferedIO, bufferSize);


   And second case, when all rename-s succeeded (with value false):

    if (renameSucceeded) {
    try {
      // This will also close the file. This is OK since multiple
      // close operations are safe.
      this.setFile(fileName, false, bufferedIO, bufferSize);


I think at least in positive scenario (at second case) it should use the
appender's configured value (, what the constructor received), because after
first rolling the logfile looses its configured (or default) true value.

Please, correct the code, if You don't have any special reason, because we have
annoying sideeffects of that.

Thanks

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org