1 Reply Latest reply on May 26, 2011 3:05 AM by jaikiran

    syslog appender help

    snewton

      Hi all,

      Im having a really hard time getting Jboss logging to a remote machine working. My remote server 10.0.0.3 has syslog-ng running and is accepting traffic from other software which is logging to it over the network. I jusdt cant get Jboss to log to it for love nor money. There are no errors in the boot log, STDOUT console or server.log.

       

      Im using AS6 Final. I have uncommented the following section of 'jboss-logging.xml' for the relevant server type that I am starting up

       

       

      {code:xml}

         <log4j-appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">

            <error-manager>

               <only-once/>

            </error-manager>

       

            <properties>

               <property name="facility">LOCAL7</property>

               <property name="facilityPrinting">true</property>

               <property name="syslogHost">10.0.0.3</property>

            </properties>

       

            <formatter>

               <pattern-formatter pattern="[%d,%c{1}] %m%n"/>

            </formatter>

         </log4j-appender>{code}

       

      When that did not do anything, a bit of googling yeilded some pointers so I also modified the root logger

       

       

      {code:xml}

         <root-logger>

            <level name="${jboss.server.log.threshold:INFO}"/>

            <handlers>

               <handler-ref name="CONSOLE"/>

               <handler-ref name="FILE"/>

               <handler-ref name="SYSLOG"/>

            </handlers>

         </root-logger>{code}

       

       

       

      My syslog-ng server at 10.0.0.3 is alive and accepting connections. I have fired up Jboss and ran a tcpdump which confirmed that Jboss is not trying to send any network data. I also run a test perl application on the same server as my Jboss AS which can sucessfully log to the remote syslog-ng daemon (port 514, UDP), so im 100% confident this is not a network or firewall issue.

       

      I have tried a few permutations, for example setting facility to 'SYSLOG', 'USER' etc. As a last ditch attempt, I also included this withint the log4j-appender section for SYSLOG

       

      {code:xml}

            <level name="INFO"/>{code}

       

      I thought maybe the syslog appender only caught logs from the app layer, not Jboss boot layer so tried a few EAR apps but got no logging data out over the network. So I was really hoping one you you experts out there could point me in the direction of the mistake I am making here. I've spent all day trying to crack this and im not sure what I am missing