Log4j 2
  1. Log4j 2
  2. LOG4J2-193

RollingFastFileAppender (in log4j-async) does not roll over

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-beta5
    • Component/s: Core
    • Labels:
      None

      Description

      The FastRollingFileManager used by RollingFastFileAppender extends the core RollingFileManager.
      I made a mistake in my implementation of FastRollingFileManager and it does not correctly create a new RandomFile during rollover.

      To fix the issue I need a small change to core.appender.rolling.RollingFileManager#checkRollover(LogEvent):
      inside this method there are two lines where the new FileOutputStream is created and passed to the parent OutputStreamAppender.
      If these two lines can be extracted into a protected method, subclasses like FastRollingFileManager can override and implement their own behaviour.

      Patch to follow soon.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        5d 42m 1 Ralph Goers 07/Apr/13 22:59
        Resolved Resolved Closed Closed
        7h 25m 1 Remko Popma 08/Apr/13 06:25
        Remko Popma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Remko Popma added a comment -

        Test code looks fine, test runs without failures. Looks good. Thanks!

        Show
        Remko Popma added a comment - Test code looks fine, test runs without failures. Looks good. Thanks!
        Ralph Goers made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Ralph Goers [ ralph.goers@dslextreme.com ]
        Fix Version/s 2.0-beta5 [ 12323970 ]
        Resolution Fixed [ 1 ]
        Hide
        Ralph Goers added a comment -

        Patch applied in revision 1465503. Note that the patch for LOG4J2-195 was applied first so please verify that all the correct changes were applied.

        Show
        Ralph Goers added a comment - Patch applied in revision 1465503. Note that the patch for LOG4J2-195 was applied first so please verify that all the correct changes were applied.
        Remko Popma made changes -
        Field Original Value New Value
        Attachment documentation-update-images-20130402.zip [ 12576677 ]
        Attachment LOG4J2-193-with-doc-updates.patch [ 12576678 ]
        Hide
        Remko Popma added a comment -

        Please find attached LOG4J2-193-with-doc-updates.patch.

        This patch makes the proposed change to RollingFileManager and fixes FastRollingFileManager.

        This patch also resolves a performance issue that was still there with FastRollingFileManager. I've re-run the relevant performance tests and updated the async manual page.

        This patch also contains documentation changes to the async manual page and the overall performance page I proposed yesterday in LOG4J2-163. (I will remove those files from LOG4J2-163 and close it.)
        Please unzip attached file documentation-update-images-20130402.zip into the src/site/resources/images/ directory.

        Show
        Remko Popma added a comment - Please find attached LOG4J2-193 -with-doc-updates.patch. This patch makes the proposed change to RollingFileManager and fixes FastRollingFileManager. This patch also resolves a performance issue that was still there with FastRollingFileManager. I've re-run the relevant performance tests and updated the async manual page. This patch also contains documentation changes to the async manual page and the overall performance page I proposed yesterday in LOG4J2-163 . (I will remove those files from LOG4J2-163 and close it.) Please unzip attached file documentation-update-images-20130402.zip into the src/site/resources/images/ directory.
        Remko Popma created issue -

          People

          • Assignee:
            Ralph Goers
            Reporter:
            Remko Popma
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development