Arkadiusz Adolph created LOG4J2-1354:
----------------------------------------
Summary: No configuration reload is triggered under Windows when
replacing the configuration file with one that has older last modified date.
Key: LOG4J2-1354
URL: https://issues.apache.org/jira/browse/LOG4J2-1354
Project: Log4j 2
Issue Type: Bug
Components: Configurators
Affects Versions: 2.5
Reporter: Arkadiusz Adolph
Priority: Minor
Due to the way Windows handles the date modified attribute on copied or
overwritten files log4j doesn't pick up the changes and doesn't reload the
configuration.
Example:
The currently used log4j configuration file (date modified = 2pm) is replaced
at 3pm by another configuration file (date modified= 1pm). Under Windows, the
date modified of this file is now 1pm. This will not trigger log4j
configuration to reload, since the new date is smaller than the original.
Maybe changing
{noformat}
if (lastModfied > fileMonitor.lastModified) {
{noformat}
to
{noformat}
if (lastModfied != fileMonitor.lastModified) {
{noformat}
in in org.apache.logging.log4j.core.util.WatchManager.WatchWorker.run() could
be an easy solution for this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]