logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicholas Wertzberger (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4J2-1366) Detecting async logger overflows using a sequence number
Date Thu, 14 Apr 2016 14:12:25 GMT
Nicholas Wertzberger created LOG4J2-1366:

             Summary: Detecting async logger overflows using a sequence number
                 Key: LOG4J2-1366
                 URL: https://issues.apache.org/jira/browse/LOG4J2-1366
             Project: Log4j 2
          Issue Type: Wish
          Components: Appenders
    Affects Versions: 2.5
            Reporter: Nicholas Wertzberger

I'm trying to build log drop detection into our system. It's OK to lose messages, and I'd
rather lose messages that drop service, but it's NOT OK to not know that log messages were

While looking around, i see that log4j2 has this concept of a sequence number in its PatternLayout.
After browsing the source code, it seems that the event has to make it all the way to the
appender doing the pattern layout to get the sequence id to increment.

As a potential solution, I propose that this sequence id is moved to be a static member of
the AbstractLogger class, and increment on every call to log.  This would allow me to detect
dropped log messages by looking for gaps in the sequence.

This message was sent by Atlassian 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