[ 
https://issues.apache.org/jira/browse/LOG4J2-1166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Remko Popma updated LOG4J2-1166:
--------------------------------
    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".)

  was:
The new WatchManager 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".)

        Summary: Applications using Log4j-2.5 with monitorInterval never shut 
down  (was: AbstractConfiguration executor should use a DaemonThreadFactory)

> Applications using Log4j-2.5 with monitorInterval never shut down
> -----------------------------------------------------------------
>
>                 Key: LOG4J2-1166
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1166
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.5
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>            Priority: Critical
>             Fix For: 2.5
>
>
> 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".)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to