• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Syslog with Jboss

 
Jessica Plunkett
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running jboss 4.2.3 on a SLES 10 server. I am trying to redirect the logs to another server but I am running into issues. I have uncommented the following section in my jboss-log4j.xml file:

<appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="Facility" value="LOCAL3"/>
<param name="FacilityPrinting" value="true"/>
<param name="SyslogHost" value="10.192.134.44"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
</layout>
</appender>

And added the syslog line under root:

<root>
<!--appender-ref ref="CONSOLE"/>-->
<appender-ref ref="SYSLOG"/>
<appender-ref ref="FILE"/>
</root>

When I start jboss - I don't get any errors but the logs are not showing up on the remote server. I restarted the syslog service. The system logs for this server are showing up on the remote server so I think syslog is configured correctly. Thanks in advance for any help.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try setting the log4j.debug property (add -Dlogj4.debug or -Dlogj4.debug=true to the JVM options). This option causes log4j to print out its own debugging information which might help point out what the problem is.
 
Jessica Plunkett
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying! I added in that option and I don't see any info in the log related to this issue. Do you have any other suggestions?
 
Jessica Plunkett
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more question - when I was reading through google, it seemed like most of the post were using UDP. I have syslog-ng configured for TCP - do I have to use UDP for jboss?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
People use UDP for logging because it is a lighter weight protocol - messages are not guaranteed to be delivered, and might not be delivered in the same order as sent. Not sure if that is what is causing problems for you or not (I haven't tried logging to syslog myself.)
 
Jessica Plunkett
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case anyone else runs into this - I couldn't find a way to make syslog use TCP - I opened the UDP port on my server and now syslog for jboss is working.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic