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

Prudent FileAppender is stopped if a thread is ever interrupted prior to a logging call

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.1.3
    • 1.0.13
    • logback-core
    • None
    • N/A

    Description

      If a thread is ever interrupted immediately followed by a logging call using a prudent FileAppender then the FileAppender is stopped and no logging can be done by any other thread.

      FileLockInterruptedException is thrown by FileChannel.lock used in FileAppender.safeWrite. This exception should not stop the entire appender, for my use cases it would be enough to just catch the exception and reset the interrupted flag.

      I've attached a very simple unit test that demonstrates this issue.

      Attachments

        Activity

          People

            tony19 Tony Trinh
            jjensen Joe Jensen
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: