Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-183

RenameUtil not truncating file if delete fails during rollover

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • logback-core
    • None
    • Microsoft Windows XP SP2
      OAS 10.1.3.4
      Java 1.5.0_14

    Description

      When using logback under Windows over Oracle Application Server, if you redeploy the web application, the log file is keep open by some reason so when a new rollover happens it fails to rename the log file.

      Currently RenameUtil does:

      • Try to rename log file.
      • If rename fails then rename by copy (copy plus delete).

      If for some reason deletion fails the log file keeps all its content so I just added a truncate if deletion fails:

      • Try to rename log file.
      • If rename fails then rename by copy (copy plus delete).
      • If delete fails then truncate file.

      I do have a patch file if it's useful.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            nisckis Jose David Barrio
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: