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

stop() method is not called on TurboFilter when shutdownAndReset is performed.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.11
    • Fix Version/s: 0.9.15
    • Component/s: logback-classic
    • Labels:
      None
    • Environment:

      Windows xp.

      Description

      I use the following code to initialize and reload logback configuration :
      LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
      JoranConfigurator configurator = new JoranConfigurator();
      configurator.setContext(lc);
      lc.shutdownAndReset();
      configurator.doConfigure(logFile);

      I have a turbofilter that needs to do some stuff when stopped. Though, the stop() method is not called in that case. So I added the following code before the shutdownandreset :
      TurboFilter tbf = lc.getFirstTurboFilter();
      while(tbf != null)

      { tbf.stop(); tbf = tbf.getNext(); }

      This is the only workaround I found. Is there any way to do better ?

        Attachments

          Activity

            People

            • Assignee:
              ceki Ceki Gülcü
              Reporter:
              morillo alexis morillo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: