Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do i configure jboss to log to syslog?

share|improve this question

Putting something like:

 <!-- Syslog events -->  <appender name="SYSLOG" class="">  <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 your log4j.conf would work... Just make sure to tune it down to what you actually want, just uses standard log4j context, you definitely wouldn't want all of your jvm logs to be spitting out to syslog in most app server configs...

share|improve this answer
where do i put log4j.conf? there isn't one by default in jboss 7 =/ – Carl Hörberg Jan 19 '12 at 16:15
See this link: – Doug Jan 19 '12 at 19:16

I am using this:

         <subsystem xmlns="urn:jboss:domain:logging:1.2">
+               <custom-handler name="SYSLOG" class="x1.jboss.syslog.SyslogHandler"     module="x1.jboss-syslog">
+                       <level name="INFO"/>
+                       <properties>
+                           <property name="loghost" value="localhost"/>
+                           <property name="application" value="jboss-as7"/>
+                       </properties>
+               </custom-handler>
             <console-handler name="CONSOLE">
                 <level name="INFO"/>
@@ -89,8 +100,7 @@
                 <level name="INFO"/>
-                    <handler name="CONSOLE"/>
-                    <handler name="FILE"/>
+                    <handler name="SYSLOG"/>

for access log it still does not work. the tag wants to write to file, and have no idea how to use a custom logger there.

share|improve this answer
Hi and Welcome to Serverfault! Please read the How to Answer a Question Guide. This site is a Q&A site not a forum. – slm Apr 12 '13 at 10:38

JBoss AS 7.2 has syslog handler, so you can use:

<syslog-handler name="SYSLOG">
    <level name="DEBUG" />
    <server-address value="<syslog.server>"/>
    <port value="<syslog.port>"/>


        <handler name="SYSLOG" />

More info in documentation:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.