0

I want to config my LOG4J. I can't update the version to 2.x because it's a big application. The actual Documentation for the LOG4J version 1.x is offline.

Here is my actual config for the appender:

<appender name="syslog" class="org.apache.log4j.net.SyslogAppender">
      <param name="SyslogHost" value="localhost:514"/>
      <param name="Facility" value="LOCAL1"/>
      <param name="FacilityPrinting" value="true"/>
      <param name="Threshold" value="WARN"/>
      <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d{dd.MMM.yyyy HH:mm:ss} %-5p %m%n"/>
      </layout>
  </appender>

I tested it with : netstat -a -b > test.txt

But i dont't found something with the Port 514.

Can somebody help me(because he made experience with LOG4J 1.x), or has somebody a copy of the documentation from LOG4J 1.x ?

J. H
  • 102
  • 11
  • https://logging.apache.org/log4j/1.2/manual.html is online. Also the API-Doc is online: https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/net/SyslogAppender.html And of course stackoverflow is online, too: https://stackoverflow.com/questions/13234727/writing-log-data-to-syslog-using-log4j – Tobias Otto Aug 25 '16 at 14:22
  • @TobiasOtto many thanks, i also posted my answer and hope it can help someone :) – J. H Sep 06 '16 at 11:03

1 Answers1

0
<appender name="Syslog" class="org.apache.log4j.net.SyslogAppender">
    <param name="SyslogHost" value="IP:514"/>
    <param name="Facility" value="USER"/>
    <param name="FacilityPrinting" value="true"/>
  <param name="Threshold" value="INFO"/>
  <layout class="org.apache.log4j.IvyLog4jLayout">
      <param name="DateFormat" value="MM/dd/yyyy hh:mm:ss"/>
    </layout>
</appender>

This way it worked for me :)

J. H
  • 102
  • 11