[logback-dev] [JIRA] Created: (LBCLASSIC-132) Please add a sequence number to LoggingEvent

Joern Huxhorn (JIRA) noreply-jira at qos.ch
Sat May 23 15:20:12 CEST 2009


Please add a sequence number to LoggingEvent
--------------------------------------------

                 Key: LBCLASSIC-132
                 URL: http://jira.qos.ch/browse/LBCLASSIC-132
             Project: logback-classic
          Issue Type: New Feature
          Components: appender
    Affects Versions: 0.9.16
            Reporter: Joern Huxhorn
            Assignee: Logback dev list


It would be very nice to have an optional Long sequenceNumber in LoggingEvent, similar to what java.util.logging is providing.

This would be useful in case of e.g. a SocketAppender where some events are lost between two connections. Another use-case would be a central logging server receiving the events. In that case, the sequence number - in combination with logger context info - could be used to uniquely reference events.

The way I'd see this implemented is in the respective appenders, not in the LoggerContext itself, because otherwise one would have gaps in case of filtered-out events. An implementation would set the sequence number of the LoggingEvent, serialize it by whatever means and reset the sequence number to null afterwards so it doesn't leak to other appenders.

Comments?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list