[prev in list] [next in list] [prev in thread] [next in thread]
List: log4j-dev
Subject: [jira] [Created] (LOG4J2-1652) Shutdown only works correctly once
From: "Tom (JIRA)" <jira () apache ! org>
Date: 2016-10-26 9:27:58
Message-ID: JIRA.13015353.1477474051000.87938.1477474078341 () Atlassian ! JIRA
[Download RAW message or body]
Tom created LOG4J2-1652:
---------------------------
Summary: Shutdown only works correctly once
Key: LOG4J2-1652
URL: https://issues.apache.org/jira/browse/LOG4J2-1652
Project: Log4j 2
Issue Type: Bug
Affects Versions: 2.7, 2.6.2
Environment: Java 8
Reporter: Tom
I am trying to reset log4j via the following code at runtime in order to write to new \
logfiles in newly specified directory.
{code:title=|borderStyle=solid}
final LoggerContext context = (org.apache.logging.log4j.core.LoggerContext) \
LogManager.getContext(false); Configurator.shutdown(context);
// Init and reset
Configurator.initialize("", logConfigFile);
context.setConfigLocation(file.toURI());
{code}
Unfortunately, this only works once correctly. After the second shutdown, new logging \
files are created but the output is still written to the old files.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic