Ralph Goers skrev den 02-06-2009 01:52:
We have a class called RequestContext. All it contains is a bunch of
constants and static helper methods to store fields into the MDC. At
the start of every request we call RequestContext.initialize(). That
clears the MDC and then adds a key named "id" that contains a
java.util.UUID as a String. The "RequestContext" is then passed
throughout the application and is even serialized and passed to remote
systems so that the distributed request can be captured and aggregated
in logs.
Is this what you are after?
Sounds interesting. Then I would have the actual calls to the API in
here (disconnected from slf4j as such) and write a suitable appender.
I was basically wondering if this abstraction was essentially something
that would make sense to have in the API too.
--
Thorbjørn Ravn Andersen "...plus... Tubular Bells!"
_______________________________________________
dev mailing list
[email protected]
http://www.slf4j.org/mailman/listinfo/dev