Details
-
New Feature
-
Resolution: Unresolved
-
Major
-
None
-
0.9.16
-
None
Description
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?