title: SyslogAppender not working
body: <p>I have a java program and I want to log in /var/log/messages file on fedora machine. I am usin log4j SyslogAppender but its not working.</p>
  
  <p>my log4j properties file contains </p>
  
  <pre><code># Set root category priority to INFO and its only appender to CONSOLE.
  log4j.rootCategory=INFO, CONSOLE, SYSLOG
  #log4j.rootCategory=INFO, CONSOLE, LOGFILE
  
  # Set the enterprise logger priority to DEBUG
  log4j.logger.com.locaid=INFO, CONSOLE, LOGFILE, SYSLOG
  
  # CONSOLE is set to be a ConsoleAppender using a PatternLayout.
  log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
  log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
  log4j.appender.CONSOLE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
  
  # LOGFILE is set to be a File appender using a PatternLayout.
  log4j.appender.LOGFILE=org.apache.log4j.FileAppender
  log4j.appender.LOGFILE.File=/home/dev/app.log
  log4j.appender.LOGFILE.Append=true
  log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
  log4j.appender.LOGFILE.layout.ConversionPattern=[%d{dd/MM/y HH:mm:ss}][%t][%1p] %c - %m%n
  
  log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
  log4j.appender.SYSLOG.syslogHost=localhost
  log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
  log4j.appender.SYSLOG.layout.conversionPattern=%d{ISO8601} %-5p [%t] %c{2} %x - %m%n
  log4j.appender.SYSLOG.Facility=LOCAL1
  log4j.appender.SYSLOG.Threshold=debug
  log4j.appender.SYSLOG.FacilityPrinting=true
  </code></pre>
  
  <p>in <code>/etc/rsyslog.conf</code> i have </p>
  
  <pre><code>local1.*      /var/log/app.log
  </code></pre>
  
  <p>in /etc/sysconfig/rsyslog have </p>
  
  <pre><code>SYSLOGD_OPTIONS="-r -m 0 -c 4"
  </code></pre>
  
  <p>On restarting rsyslog service app.log file is created but no logs are being appended. I have also tried with default USER facility its not working although <code>logger -p LOCAL1.info</code> cmd is working and appending log to app.log. Need help.</p>