0 Replies Latest reply on Mar 11, 2004 5:57 PM by nipashah

    log4j and syslog

    nipashah Newbie

      I want to ahve log4j sending logs to syslog. Todo so I changed the log4j.xml file to uncomment the syslog appender. I also added an layout element in it.


      [appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender"]
      <param name="Facility" value="LOCAL7"]
      <param name="FacilityPrinting" value="true"]
      <param name="Sysloghost" value="localhost"]
      <layout class="org.apache.log4j.PatternLayout"]
      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/]

      <appender/]


      I have created a separate category for some components to send message

      <category name="com.cname.dname.pname"]
      <appender-ref ref="SYSLOG"]
      </category]

      I have modified the rrot category as below.

      <root]
      <appender-ref ref="CONSOLE"]
      <appender-ref ref="FILE"]
      <appender-ref ref="SYSLOG"]


      Now I do not see any error or exceptions when I start jboss but at the same time I do not see any log going to the syslog from jboss and the components defined under com.cname.dname.pname.

      what could be wrong?

      PS: I have changed an angle bracket to a ] bracket so that it shows up correctly.

      Thanks,
      Nipa