5 Replies Latest reply on Dec 14, 2010 6:22 AM by ashishnegitech

    How to redirect jboss console message to /var/log/syslog file

    ashishnegitech

      Hello All,

       

      I am using ubuntu 10.04 and jboss AS 5. My objective is to redirect server console message to syslog.

      I tried uncommenting

       

      <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
           <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
           <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{ABSOLUTE},%c{1}] %m%n"/>
           </layout>
         </appender>

       

      in jboss-log4j.xml file.

       

      But i am not able to see my server startup message logged in /var/log/syslog.

      Do i need to make other configurations.

      I added

      local7.*                /var/log/syslog

      in - /etc/rsyslog.d/50-default.conf file.

       

      I restarted the syslogd daemon and started the jboss and expecting the console message generated by the jboss AS to syslog. But didn't find the result.


      Am i expecting right thing?

       

      Looking forward for support

       

      Regards,

      Ashish Negi