Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1166

Applications using Log4j-2.5 with monitorInterval never shut down

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: Configurators
    • Labels:
      None

      Description

      The new WatchManager introduced in 2.5 uses a ScheduledThreadPoolExecutor so it can roll over triggered by a timer event instead of a log event.

      The executor currently uses the standard thread factory, which creates non-daemon threads. This means that applications that use Log4j 2 and have monitorInterval="..." in their configuration will never shut down.

      The fix is to pass a DaemonThreadFactory to the ScheduledThreadPoolExecutor constructor. (This also allows us to specify a better name than "pool-1-thread-1".)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                remkop@yahoo.com Remko Popma
                Reporter:
                remkop@yahoo.com Remko Popma
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: