Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access logs to remote syslog server

 
russ sced
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wonder if anyone can help ....

I have done a bit of investigation and although it appears possible from all the explanations i have seen i still do not understand how to implement ....

I have tomcat5 webservers running in a windows environment

i need to know how to configure it so that i can get the "access logs" sent to a remote syslog server

i have managed to get access logs writing to a flat file but i cannot for the life of me get them logging remotely to a syslog server

My tomcat knowledge is limited (very limited) so if anyone does know how to accomplish this please explain for a thicko !

thanks in advance !
 
Tim Holloway
Saloon Keeper
Posts: 18302
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Russ!

You'll need a custom log appender. Tomcat normally uses the java.lang.utilities logger (juli), but I'm not sure what support there may be for syslog using that logger. The Apache log4j logger has a syslog appender, however you have to build a custom version of Tomcat to use log4j. Instructions are included in the basic Tomcat documentation.

The syslog appender literally does what it says, which is to log to the OS syslog facility. I'm not actually sure what it does when the OS is Windows, however, since Windows doesn't have syslog, it has an event recorder. On a Linux machine, logging syslog to a remote logger would be done by configuring the OS system logger itself to record to a remote system.

That's the basics. A little googling might direct you to something more suitable, such as a log appender that formats syslog network packets and sends them directly. I don't know if one exists, but there's no reason why it shouldn't.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic