[slf4j-dev] Transactions in slf4j?

Thorbjørn Ravn Andersen thunderaxiom at gmail.com
Tue Jun 2 09:52:38 CEST 2009


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!"




More information about the slf4j-dev mailing list