log4cxx SocketAppender

Next Topic
 
classic Classic list List threaded Threaded
10 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

Reply | Threaded
Open this post in threaded view
|

Re: log4cxx SocketAppender

Greg Knowd
Is this still and issue with the latest version?
Reply | Threaded
Open this post in threaded view
|

Re: log4cxx SocketAppender

Marinko
You are still not supporting the log4j2 events xml format. All you need to do is to adjust the XmlParser you actually use

Here the xsd format https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/resources/Log4j-events.xsd
Reply | Threaded
Open this post in threaded view
|

Re: log4cxx SocketAppender

Marinko
Here the configuration of the log4j2 which supports the XMLLayout

Configuration:
  Appenders:
    Console:
      name: Console_Appender
      target: SYSTEM_OUT
      PatternLayout:
        Pattern: "%d %-5p %C{3} (%F:%L) - %m%n"
    Socket:
      name: Socket_Appender
      host: 127.0.0.1
      port: 4447
      protocol: TCP
      XMLLayout:
        complete: true
  Loggers:
    Root:
      level: debug
      AppenderRef:
      - ref: Socket_Appender
      - ref: Console_Appender
Reply | Threaded
Open this post in threaded view
|

Re: log4cxx SocketAppender

Marinko
I have created a Log4View plugin which is supporting log4j2 socketappender

https://github.com/marinkobabic/log4view-log4jreceiver

Any way to get it in the official product?

Thanks
Marinko
Reply | Threaded
Open this post in threaded view
|

Re: log4cxx SocketAppender

Ulrich
Administrator
Hi Mario,

please send us the plugin to support@prosa.biz and we will look over it.
When it fits in our software design, we would love to integrate it into Log4View.

Thank you!

Ulrich
Reply | Threaded
Open this post in threaded view
|

Technical Help

anisazula
In reply to this post by Andreas
Fall is here and therefore the 10 best antivirus programs have released their latest versions for 2012. The list hasn't changed from 2011 and therefore the best antivirus programs have begin with the simplest features and tools again. and therefore the only difference we have seen is Web-root losing its place due to a big change in its line . To be included within the list, these antivirus software programs had to impress in a minimum of five areas. They were evaluated on scope of protection, effectiveness, simple use, simple installation and new features. and that they were all tested and approved by the leading test labs like Virus Bulletin and AV-Comparatives. Garmin.com/Express | Rand McNally GPS Update | Download Garmin Express | Rand McNally Update | Garmin.com/mapupdates | Mywifi Ext | belkin router setup | Belkin router setup | belkin range extender setup | Belkin Login | Belkin Router Login