Trying to redirect jboss server logs into rsyslog

Solution Verified - Updated -

Issue

What I am trying to do is the following. I want to take the output from JBoss and send it to rsyslog which is a newer more robust syslog process. I have made the change in the jboss-log4j.xml as follows.

<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>

<root>
   <priority value="${jboss.server.log.threshold}"/>
   <appender-ref ref="CONSOLE"/>
   <appender-ref ref="FILE"/>
   <appender-ref ref="SYSLOG"/>
</root>
  • How to direct logs from a JBoss Application to a Centralized Logging Server (RSyslog) ?
  • I have been able to get the output written to SYSLOG on a local VM host but when using RSYSLOG I am unable to get the output.

Environment

  • JBoss Enterprise Application Platform (EAP) 5.x
  • Linux
    • rsyslog

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.