log4cxx SocketAppender

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

log4cxx SocketAppender

Andreas
Hello,

how to setup the log4cxx SocketAppender to receive log messages in Log4View ?
I use the DOMConfigurator configuration.

Here is my sample config:

<appender name="socketAppender" class="org.apache.log4j.net.SocketAppender">
    <layout class="org.apache.log4j.PatternLayout">
     
    </layout>
   
   
   
</appender>

<root>
    <priority value="all" />
    <appender-ref ref="socketAppender"/>
</root>


Best regards

Andreas
Reply | Threaded
Open this post in threaded view
|

Re: log4cxx SocketAppender

Philipp Lauchner
Administrator
Dear Andreas,

unfortunatelly, we do not have personal experience with log4cxx. Nevertheless, as the configuration should be somewhat log4j conform, could you please try using the following config?

<?xml version="1.0" encoding="UTF-8" ?>
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

  <appender name="SocketAppender" class="org.apache.log4j.net.SocketAppender">
    <param name="Port" value="9133"/>
    <param name="RemoteHost" value="127.0.0.1"/>
    <param name="ReconnectionDelay" value="30000"/>
  </appender>

  <root>
    <priority value="all" />
    <appender-ref ref="SocketAppender"/>
  </root>

</log4j:configuration>

Yours sincerely

Philipp Lauchner
PROSA GmbH
Development & Support
Reply | Threaded
Open this post in threaded view
|

Re: log4cxx SocketAppender

Marinko
I use log4j2 and the following configuration does not work.

    Socket:
      name: Socket_Appender
      host: 127.0.0.1
      port: 9133
      protocol: TCP

  Loggers:

      Root:
        level: debug
        AppenderRef:
          - ref: Socket_Appender

The socket connection has been established but the log4view is not showing the log entries
Reply | Threaded
Open this post in threaded view
|

Re: log4cxx SocketAppender

Philipp Lauchner
Administrator
Dear Marinko,

we could recreate your problem. It seems like log4j2 is unfortunately not supported by our logic at the moment. We will evaluate the support of log4j2 in future versions of Log4View.

Yours sincerely

Philipp Lauchner
PROSA GmbH  
Development & Support