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

Unable to set delay in DefaultShutdownHook with logback 1.3.0

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.4.2, 1.3.2
    • 1.3.0
    • logback-core
    • None

    Description

      With logback 1.3.0, registering a shutdownHook as

      ...
        <shutdownHook class="ch.qos.logback.core.hook.DefaultShutdownHook">
          <delay>2000</delay>
        </shutdownHook>
      

      yields on status manager:

      12:24:15,117 |-INFO in ch.qos.logback.core.model.processor.ShutdownHookModelHandler - Registeting shuthown hook with JVM runtime.
      12:24:15,121 |-WARN in ch.qos.logback.core.model.processor.ImplicitModelHandler - Ignoring unkown property [delay] in [ch.qos.logback.classic.LoggerContext]
      

      with default delay (0) being applied, whereas the (almost) same configuration for logback 1.2.11:

      ...
        <shutdownHook class="ch.qos.logback.core.hook.DelayingShutdownHook">
          <delay>2000</delay>
        </shutdownHook>
      

      works ok.

      Small nitpicks:

      • note that the class changed name between versions, so migrations to logback 1.3.0 containing that hook have to rename/remove the class attribute on the shutdownHook, thus migration isn't simply replacing jars.
      • (really small nitpick) note mispellings on status manager outputs: Registeting, unkown.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            juanpablo Juan Pablo Santos Rodríguez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: