• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Syslog with Jboss

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic