File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Access logs to remote syslog server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Access logs to remote syslog server" Watch "Access logs to remote syslog server" New topic
Author

Access logs to remote syslog server

russ sced
Greenhorn

Joined: Jan 23, 2012
Posts: 1
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

Joined: Jun 25, 2001
Posts: 16308
    
  22

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access logs to remote syslog server