logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale King <dalewk...@gmail.com>
Subject Re: Addning new fields to the logs.
Date Tue, 17 Mar 2009 02:27:32 GMT
I think you want a Mapped Diagnostic Context (MDC) which lets you add
name-value pairs in thread specific storage that you can access in the log.


On Sun, Mar 15, 2009 at 4:00 PM, Rodolfo Gonzalez <rgonzalez72@yahoo.com>wrote:

> Hi all,
> We've been using the log4cxx library for a while in our applications. Then
> we had this new requirement to add some new unsupported fields in the log.
> After some research we were unable to find any documentation on the subject
> so we had to look at the code and try to come up with a solution. We impose
> yet another requirement on ourselves that is; not to change the library
> code and make the code as
> generic as possible.
> Then we decided to publish the solution in the hope somebody might find it
> useful. It can be found here:
> http://rodolfotech.blogspot.com/2009/03/adding-new-fields-to-log4cxx-logger.html
> I don't know if this is the best way to do it works for us. Any alternative
> approach will be highly appreciated.
> Many thanks,

Dale King

View raw message