Tomcat uses a logging valve...so it's already GBeanized. It can have multiple logs as there can be a valve set at the Engine, Host, and Context levels.

To do this from a Gbean perspective, I would query for all of the ValveGBeans and call getInternalObject() on it. Verify its an instance of org.apache.catalina.valves.AccessLogValve and then Query that object for its prefix and suffix properties. This will give you the log file name (they live in the $GERONIMO_HOME/var/catalina/log directory).

You also could create a Tomcat logging GBean to make this process a little easier, but it *must* extend the ValveGBean because since its essentially a valve, it needs to be in the chain of valve interceptors.

Would it not just be easier to query the $GERONIMO_HOME/var/catalina/log directory for files?

Jeff

I was investigating what is necessary to get the log management portlet in the console working for tomcat. It currently only works to display the jetty web log. As I was digging into this it is starting to get a little deeper than I anticipated and would like some recommendations.

- The log portlet references a GBean object for the JettyRequestLog.
- I don't see an equivalent GBean in tomcat. Should I attempt to create one and wrap the Tomcat web log in a GBean too?

Reply via email to