You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Dale King <da...@gmail.com> on 2008/03/07 03:57:37 UTC

What is status of log4cxx and chainsaw

What is the status of using Log4Cxx 0.10.0 RC2 with the current
version of chainsaw? Here is my experience:

- Reading an XMLLayout log file created by log4cxx, works perfectly
including location information and MDC properties (when turned on in
the layout).
- Using an XMLSocketAppender wroks but I get no location information
or MDC properties on the chainsaw side and I get annoying trace
messages from chainsaw in the log for looking up the entities because
it shows up in the chainsaw log
- SocketAppender works, but once again no location information or MDC properties
- SocketHubAppender connects, but then does nothing. I get no loging pane.

Is this the expected behavior? I found the properties on
XMLSocketAppender to turn on location information, but it did not seem
to matter. My configuration file looks like this:

log4j.rootLogger=TRACE, A1, socketLogger

log4j.appender.A1=org.apache.log4j.FileAppender

log4j.appender.A1.filename=log.xml
log4j.appender.A1.layout=org.apache.log4j.XmlLayout
log4j.appender.A1.layout.properties=true
log4j.appender.A1.layout.locationinfo=true

log4j.appender.socketLogger=org.apache.log4j.net.XMLSocketAppender
log4j.appender.socketLogger.RemoteHost=localhost
log4j.appender.socketLogger.Port=4448
log4j.appender.socketLogger.locationinfo=true


-- 
Dale King

Re: What is status of log4cxx and chainsaw

Posted by Dale King <da...@gmail.com>.
It looks like I can get location info and MDC on an XMLSocketAppender
if I use an XML configuration as follows to override the default
XMLLayout, but you cannot do the same with a property file
configuration:

  <appender name="xmlsocket" class="org.apache.log4j.net.XMLSocketAppender">
    <param name="RemoteHost" value="localhost"/>
    <param name="Port" value="4448"/>
    <layout class="org.apache.log4j.XMLLayout">
      <param name="properties" value="true"/>
      <param name="locationinfo" value="true"/>
    </layout>
  </appender>


On Thu, Mar 6, 2008 at 9:57 PM, Dale King <da...@gmail.com> wrote:
> What is the status of using Log4Cxx 0.10.0 RC2 with the current
>  version of chainsaw? Here is my experience:
>
>  - Reading an XMLLayout log file created by log4cxx, works perfectly
>  including location information and MDC properties (when turned on in
>  the layout).
>  - Using an XMLSocketAppender wroks but I get no location information
>  or MDC properties on the chainsaw side and I get annoying trace
>  messages from chainsaw in the log for looking up the entities because
>  it shows up in the chainsaw log
>  - SocketAppender works, but once again no location information or MDC properties
>  - SocketHubAppender connects, but then does nothing. I get no loging pane.
>
>  Is this the expected behavior? I found the properties on
>  XMLSocketAppender to turn on location information, but it did not seem
>  to matter. My configuration file looks like this:
>
>  log4j.rootLogger=TRACE, A1, socketLogger
>
>  log4j.appender.A1=org.apache.log4j.FileAppender
>
>  log4j.appender.A1.filename=log.xml
>  log4j.appender.A1.layout=org.apache.log4j.XmlLayout
>  log4j.appender.A1.layout.properties=true
>  log4j.appender.A1.layout.locationinfo=true
>
>  log4j.appender.socketLogger=org.apache.log4j.net.XMLSocketAppender
>  log4j.appender.socketLogger.RemoteHost=localhost
>  log4j.appender.socketLogger.Port=4448
>  log4j.appender.socketLogger.locationinfo=true
>
>
>  --
>  Dale King
>



-- 
Dale King

Re: What is status of log4cxx and chainsaw

Posted by Curt Arnold <ca...@apache.org>.
On Mar 6, 2008, at 8:57 PM, Dale King wrote:

> What is the status of using Log4Cxx 0.10.0 RC2 with the current
> version of chainsaw? Here is my experience:
>
> - Reading an XMLLayout log file created by log4cxx, works perfectly
> including location information and MDC properties (when turned on in
> the layout).
> - Using an XMLSocketAppender wroks but I get no location information
> or MDC properties on the chainsaw side and I get annoying trace
> messages from chainsaw in the log for looking up the entities because
> it shows up in the chainsaw log
> - SocketAppender works, but once again no location information or  
> MDC properties
> - SocketHubAppender connects, but then does nothing. I get no loging  
> pane.
>
> Is this the expected behavior? I found the properties on
> XMLSocketAppender to turn on location information, but it did not seem
> to matter. My configuration file looks like this:
>
> log4j.rootLogger=TRACE, A1, socketLogger
>
> log4j.appender.A1=org.apache.log4j.FileAppender
>
> log4j.appender.A1.filename=log.xml
> log4j.appender.A1.layout=org.apache.log4j.XmlLayout
> log4j.appender.A1.layout.properties=true
> log4j.appender.A1.layout.locationinfo=true
>
> log4j.appender.socketLogger=org.apache.log4j.net.XMLSocketAppender
> log4j.appender.socketLogger.RemoteHost=localhost
> log4j.appender.socketLogger.Port=4448
> log4j.appender.socketLogger.locationinfo=true
>
>
> -- 
> Dale King

If by "current version of Chainsaw", you mean the version available  
from WebStart, then location  info will be lost since that version was  
built using log4j 1.3 which used an serialization format incompatible  
with log4j 1.2 which log4cxx emulates.  The current SVN HEAD of  
Chainsaw is designed to be built with log4j 1.2.15 or later and should  
be able to accept location information from log4j 1.2.x or log4cxx  
0.10.x.  Pushing Chainsaw to release is the next major release push.

I have tested Chainsaw with log4cxx's SocketAppender, but don't recall  
if I tried SocketHubAppender.




Re: What is status of log4cxx and chainsaw

Posted by Dale King <da...@gmail.com>.
Looks like from this thread:

http://markmail.org/message/2sky6pbluy7wnzlg#query:chainsaw%20sockethubreceiver+page:1+mid:imua44vaomgukmkq+state:results

That is the expected behavior for the currently released version of chainsaw

On Thu, Mar 6, 2008 at 9:57 PM, Dale King <da...@gmail.com> wrote:
> What is the status of using Log4Cxx 0.10.0 RC2 with the current
>  version of chainsaw? Here is my experience:
>
>  - Reading an XMLLayout log file created by log4cxx, works perfectly
>  including location information and MDC properties (when turned on in
>  the layout).
>  - Using an XMLSocketAppender wroks but I get no location information
>  or MDC properties on the chainsaw side and I get annoying trace
>  messages from chainsaw in the log for looking up the entities because
>  it shows up in the chainsaw log
>  - SocketAppender works, but once again no location information or MDC properties
>  - SocketHubAppender connects, but then does nothing. I get no loging pane.
>
>  Is this the expected behavior? I found the properties on
>  XMLSocketAppender to turn on location information, but it did not seem
>  to matter. My configuration file looks like this:
>
>  log4j.rootLogger=TRACE, A1, socketLogger
>
>  log4j.appender.A1=org.apache.log4j.FileAppender
>
>  log4j.appender.A1.filename=log.xml
>  log4j.appender.A1.layout=org.apache.log4j.XmlLayout
>  log4j.appender.A1.layout.properties=true
>  log4j.appender.A1.layout.locationinfo=true
>
>  log4j.appender.socketLogger=org.apache.log4j.net.XMLSocketAppender
>  log4j.appender.socketLogger.RemoteHost=localhost
>  log4j.appender.socketLogger.Port=4448
>  log4j.appender.socketLogger.locationinfo=true
>
>
>  --
>  Dale King
>



-- 
Dale King