logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-318) On termination Log4j terminates before the application
Date Sat, 20 Jul 2013 12:56:48 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13714417#comment-13714417

Gary Gregory commented on LOG4J2-318:

You cannot control the order of JRE shutdown threads, so it seems to me we need to make using
a Log4J shutdown thread optional. If you turn it off, you can then shutdown Log4j yourself.

We could call the option "shutdownHook=true|false".

> On termination Log4j terminates before the application
> ------------------------------------------------------
>                 Key: LOG4J2-318
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-318
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-beta8
>            Reporter: Maurizio Sartori
>              Labels: shutdown
>         Attachments: test.zip
> My application is multi-threaded, when Ctrl-C is pressed to terminate it, Log4J ShutdownHooks
in LoggerContext are called to close the appenders, so I lost any log that the application
does during its termination.
> What I think I need, is a way to disable the automatic close done by LoggerContext and
a way to call the close by myself.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message