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

ContextListener that stops the LoggerContext when using DefaultContextSelector

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 0.9.15
    • None
    • None

    Description

      When using the "The simplest and easiest approach" to configure logback as described here: http://logback.qos.ch/manual/loggingSeparation.html, The LoggerContext never gets stopped when the application is redeployed in an applicationserver.

      This causes both memory leaks, and an unability to Rename log files using RollingFileAppender because several handles to the log file exists.

      An easy solution to this is to stop the LoggerContext in a ServletContextListener - much the same as for the ContextJNDISelector using ContextDetachingSCL.

      I will upload a file - based on the ContextDetatchingSCL which does the job.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            pnyheim Paul Nyheim
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: