Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

Can tomcat write to apache access_log/error_log

Can tomcat write to apache access_log/error_log?
SOLUTION
Avatar of Surrano
Surrano
Flag of Hungary image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark
Mark

ASKER

tomcat seems to be logging to the Apache access_log; the messages are in a tomcat-like format, e.g:

198.234.157.10 - - [04/Feb/2014:10:48:58 -0500] "GET /ohprs/images/slideShow/Blizzard1.jpg HTTP/1.1" 304 -

I'm suspecting tomcat for doing the logging as this does not appear to be the default Apache log format.

I've found that writing to stderr from jsp programs logs to $CATALINA_HOME/logs/catalina.out. That is probably adequate for my needs without going through all the complexity of using JULI or Log4j, but I'd rather log to Apache's access_log or error_log so I only have to examine one file.

Not doable?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark

ASKER

Writing to $CATALINA_HOME/logs/catalina.out from System.err.println() does what I want. JULI or Log4j is vastly overcomplicated and time consuming for my needs.