logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Borovac <Stefan.Boro...@t-online.de>
Subject Re: Socket and XMLSocketReceiver
Date Tue, 19 Aug 2008 18:02:32 GMT
Hi Dale,

thanks for your answer and the usefull tips.
I have expected something like this but 2 1/2 years since
the last Chainsaw release is quite a bit too long.
We will see if we use Chainsaw at all.

Cheers
   Stefan

Dale King wrote:

> On Tue, Aug 19, 2008 at 9:26 AM, Stefan.Borovac@t-online.de 
> <mailto:Stefan.Borovac@t-online.de> <Stefan.Borovac@t-online.de 
> <mailto:Stefan.Borovac@t-online.de>> wrote:
> 
> 
>     Hi All,
> 
>     I'am using log4cxx 0.10.0 and Chainsaw v2 as a server. On the Chainsaw
>     side I'am
>     using a SocketReceiver and a XMLSocketReceiver. Now I have three
>     beginner questions
>     concerning this setup.
> 
>     1) The events logged by the XMLSocketReceiver are all written to the
>     "chainsaw-log" tab.
>     This is somehow ugly. Is it possible to set the "Application property"
>     such that the XML
>     messages are going to a different tab? I have found only vague
>     descriptions on setting
>     this property (even on the name of the key).
> 
> 
> Yes the following will do it for the current thread. It is on a per 
> thread basis so needs to be done per thread.
> 
>         log4cxx::MDC::put( "application", "my application name" );
> 
>  
> 
>     3) While it was possible to send the "locationInfo" with the
>     XMLSocketAppender, the
>     same does not work on the SocketAppender/SocketReceiver pair, although
>     the C++ code
>     suggest that the location info is serialized. Any clou here?
> 
> 
> This is a known version compatibility issue with the released version of 
> Chainsaw. The current version of Log4j is the 1.2.x branch which is what 
> Log4Cxx is a port of. A long while back work was started on a new 1.3 
> branch of Log4J. This branch was later abandoned and most of the 
> features ported to the 1.2.x branch. There are differences between 1.2 
> and 1.3 that mean that 1.2 serialized location info and MDC properties 
> do not deserialize correctly in 1.3. The problem is that the currently 
> released version of Chainsaw is built with the 1.3 branch of Log4J.
> 
> For now stick to XMLSocketAppender. Feel free to complain loudly over on 
> the Log4J forums about this. I find it unbelievable that there has been 
> no new release of Chainsaw to fix this since the release of Chainsaw 2 
> 1/2 years ago!
> 
> You're welcome to try to build Chainsaw yourself against the 1.2 branch. 
> Good luck, I've never been able to do it.
> 
> Here is more info on this:
> 
> http://markmail.org/message/ih7q5rgfckmlowaw#query:log4j%20chainsaw%20MDC+page:1+mid:ny52attu27fglhnl+state:results
> 
> -- 
> Dale King

Mime
View raw message