You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Arkadiusz Adolph (JIRA)" <ji...@apache.org> on 2016/04/05 11:20:25 UTC

[jira] [Created] (LOG4J2-1354) No configuration reload is triggered under Windows when replacing the configuration file with one that has older last modified date.

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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org