title: Ubuntu Configuration for using Log4J Syslog
body: <p>I'm asking how to use the log4j syslog appender and which settings I have to do in Ubuntu. Currently nothing happen and no local1.log will be created...</p>
  
  <p>My log4j.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt;
  
  &lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"&gt;
  &lt;!-- SYS LOG SETTINGS --&gt;
    &lt;appender name="syslog" class="org.apache.log4j.net.SyslogAppender"&gt;
        &lt;param name="SyslogHost" value="localhost"/&gt;
        &lt;param name="Facility" value="LOCAL1"/&gt;
        &lt;param name="FacilityPrinting" value="true"/&gt;
        &lt;param name="Threshold" value="WARN"/&gt;
        &lt;layout class="org.apache.log4j.PatternLayout"&gt;
          &lt;param name="ConversionPattern" value="%d{dd.MMM.yyyy HH:mm:ss} %-5p %m%n"/&gt;
        &lt;/layout&gt;
    &lt;/appender&gt;
  
  &lt;root&gt; 
      &lt;priority value="trace" /&gt; 
      &lt;appender-ref ref="syslog" /&gt;
  &lt;/root&gt;
  
  &lt;/log4j:configuration&gt;
  </code></pre>
  
  <p>I use Ubuntu 13.4 with rsyslog and tried this configurations...
  /etc/rsyslog.d/50-default.conf</p>
  
  <pre><code>local1.*   /var/log/local1.log
  </code></pre>
  
  <p>and I read I have to activate the remote log, so that programs can write logs in syslog, but in which setting file I have to put the SYSLOGD="-r"? (former Ubuntu versions)</p>