Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2012

No compression when using a separate drive in Linux

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.9.0
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Unix

      Description

      When setting up the filePattern of a RollingFileAppender pointing to a different FS than the fileName, the file gets moved but not compressed:

      In this example, /usr/local and /archives are not on the same FS:

      2017-08-11 14:34:33,632 pool-8-thread-1 TRACE DefaultRolloverStrategy.purge() took 15.0 milliseconds 
      2017-08-11 14:34:33,643 pool-8-thread-1 DEBUG RollingFileManager executing synchronous FileRenameAction[/usr/local/app/logs/app.log to /archives/logs/app-2017-08-11_14-34-33.log, renameEmptyFiles=false] 
      2017-08-11 14:34:33,646 pool-8-thread-1 ERROR Unable to move file /usr/local/app/logs/app.log to /archives/logs/app-2017-08-11_14-34-33.log: java.nio.file.AtomicMoveNotSupportedException /usr/local/app/logs/app.log -> /archives/logs/app-2017-08-11_14-34-33.log: Invalid cross-device link 
      2017-08-11 14:34:33,736 pool-8-thread-1 TRACE Renamed file /usr/local/app/logs/app.log to /archives/logs/app-2017-08-11_14-34-33.log using copy and delete

      Also reported here:
      https://stackoverflow.com/questions/43179979/log4j2-rollingfileappender-invalid-cross-device-link

        Issue Links

          Activity

          Hide
          benjamin.jaton Benjamin Jaton added a comment -
          Show
          benjamin.jaton Benjamin Jaton added a comment - Already sent a pull request ( https://github.com/benji/logging-log4j2-LOG4J2-2012 )
          Hide
          garydgregory Gary Gregory added a comment -

          Hi Benjamin Jaton,

          https://github.com/benji/logging-log4j2-LOG4J2-2012 is your repo, not a pull request. Can you please provide a PR?

          Thank you!
          Gary

          Show
          garydgregory Gary Gregory added a comment - Hi Benjamin Jaton , https://github.com/benji/logging-log4j2-LOG4J2-2012 is your repo, not a pull request. Can you please provide a PR? Thank you! Gary
          Hide
          benjamin.jaton Benjamin Jaton added a comment -
          Show
          benjamin.jaton Benjamin Jaton added a comment - Sorry the URL of the PR is https://github.com/apache/logging-log4j2/pull/107
          Hide
          garydgregory Gary Gregory added a comment -

          Fixed by [LOG4J-2016]. Please verify and close this ticket.

          Show
          garydgregory Gary Gregory added a comment - Fixed by [LOG4J-2016] . Please verify and close this ticket.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 4aa719a5e689bb7ec83b53133d04f195e28d9bec in logging-log4j2's branch refs/heads/master from Gary Gregory
          [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=4aa719a ]

          LOG4J2-2012 No compression when using a separate drive in Linux.
          Already fixed by [LOG4J-2016].

          Show
          jira-bot ASF subversion and git services added a comment - Commit 4aa719a5e689bb7ec83b53133d04f195e28d9bec in logging-log4j2's branch refs/heads/master from Gary Gregory [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=4aa719a ] LOG4J2-2012 No compression when using a separate drive in Linux. Already fixed by [LOG4J-2016] .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user benji commented on the issue:

          https://github.com/apache/logging-log4j2/pull/107

          No changes have been made:
          https://github.com/benji/logging-log4j2-LOG4J2-2012/commit/f42b27fa5e2b5b3092960cb6dcabd8f8723b8b8c
          Sorry I should have updated this thread.

          Show
          githubbot ASF GitHub Bot added a comment - Github user benji commented on the issue: https://github.com/apache/logging-log4j2/pull/107 No changes have been made: https://github.com/benji/logging-log4j2-LOG4J2-2012/commit/f42b27fa5e2b5b3092960cb6dcabd8f8723b8b8c Sorry I should have updated this thread.

            People

            • Assignee:
              Unassigned
              Reporter:
              benjamin.jaton Benjamin Jaton
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development