[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

log4r - context (NDC

List Recv

3/6/2006 10:27:00 PM

Is there anyway to set a context for log4r?

log4j has somethign like NDC

Basically, in a web app, I'd like to correlate messages for the same
client. I'd like to do something like

context = "#{user.ip} #{user.name}"

and have it automatically appended to each logging message, or, even
better, appended whenever the context changes (that is, if there are 5
messages in a row from the same user, no need to keep repeating the
context)

is this available?