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

When FileAppender and RollingFileAppender stop, It should remove the key from logger context.

    XMLWordPrintable

Details

    Description

      I use SiftingAppender with RollingFileAppender.
      I found that when a RollingFileAppender managed by the SiftingAppender timeout, the SiftingAppender stop it and throw it away.
      But, when the same RollingFileAppender is triggered with the same MDC, the SiftingAppender attempt to build a new one and start it.
      Because the previous RollingFileAppender register itself with fileNamePattern in the Logger Context's FA_FILENAME_COLLISION_MAP and never remove it, the new one cannot start, and no log will be output.
      So, I suggest that when the RollingFileAppender stopped, remove the key it previous registered in the Logger Context's FA_FILENAME_COLLISION_MAP.
      And, I think it will also happen to FileAppender.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            moonfruit MoonFruit
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: