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). 

2) Question (1) is also a problem for the SocketReceiver, well different
tabs are open for
different remote hosts, but an application name is still missing.

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?

Any help is welcome!

Cheers
  Stefan

P.S.: Here is the Chainsaw config. 

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";
debug="true">
   
   <appender name="A2" class="org.apache.log4j.ConsoleAppender">
      <layout class="org.apache.log4j.SimpleLayout"/>
   </appender>

   <plugin name="SocketReceiver"
class="org.apache.log4j.net.SocketReceiver" style="margin:0px;">
      <param name="port" value="4560"/ style="margin:0px;">
      <param name="name" value="mySocketReceiver"/ style="margin:0px;">
      <param name="threshold" value="TRACE"/ style="margin:0px;">
   </plugin>
   
   <plugin name="XMLSocketReceiver"
class="org.apache.log4j.net.XMLSocketReceiver" style="margin:0px;">
      <param name="decoder" value="org.apache.log4j.xml.XMLDecoder"/
style="margin:0px;">
      <param name="port" value="4448"/ style="margin:0px;">
      <param name="name" value="myXMLSocketReceiver"/
style="margin:0px;">
      <param name="threshold" value="TRACE"/ style="margin:0px;">
   </plugin>

   <root>
      <level value="debug"/>
   </root>

</log4j:configuration>

And here the C++ config on the client side:

// XML socket stuff +++++++++++++++++++++++++++++++++++++++++++++++
                XMLSocketAppenderPtr myXMLSocketAppender( 
                        new XMLSocketAppender(
                        LOG4CXX_STR("XXX.XXX.XXX.XXX"),
                        4448
                        )
                );
                
                XMLLayoutPtr myXMLLayout( new XMLLayout() );
                myXMLLayout->setLocationInfo(true);
                
                myXMLSocketAppender->setLayout(myXMLLayout);
                myXMLSocketAppender->activateOptions(pool);
                

                // plain socket stuff 
+++++++++++++++++++++++++++++++++++++++++++++++
                SocketAppenderPtr mySocketAppender(
                        new SocketAppender(
                        LOG4CXX_STR("XXX.XXX.XXX.XXX"),
                        4560
                        )
                );
                mySocketAppender->activateOptions(pool);

                logger->addAppender(mySocketAppender);
                logger->addAppender(myXMLSocketAppender);
                logger->setLevel(log4cxx::Level::getDebug());




Reply via email to