logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Gabeler-Lee (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4NET-323) AbsoluteTimeDateFormatter caches string representation of now too aggressively
Date Thu, 09 Feb 2012 20:04:26 GMT
AbsoluteTimeDateFormatter caches string representation of now too aggressively

                 Key: LOG4NET-323
                 URL: https://issues.apache.org/jira/browse/LOG4NET-323
             Project: Log4net
          Issue Type: Bug
          Components: Other
    Affects Versions: 1.2.11
            Reporter: Matthew Gabeler-Lee
            Priority: Minor

The AbsoluteTimeDateFormatter class caches the string representation of the most recent timestamp
it has seen, down to the second.

The problem is, this cache is inherited by other formatter classes, which represent that value
in different ways.

This causes the formatted date/time generated by layouts and thus appended to logs to be inconsistent
if there are multiple date/time formats in use in different appenders.  For example, I have
a debug appender which uses the %date{ABSOLUTE} format, and a log file appender which uses
the %date{ISO8601} format.  Because the debug appender sees most messages first, most (but
not all!) entries in the log file get the ABSOLUTE format, even though ISO8601 was specified.

The cache of the string representation needs to be specific to a particular date format.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message