Jeff Genender wrote:

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.

Thanks for the clarification. I need to educate myself on logging valves. That wasn't obvious to me when looking at the plan for the server (ie. I didn't notice a GBean for the logs).

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

Yes, I thought of that too. I was trying to stay within the general design of the portlet as it stands. I suppose the handling of the log content could be fundamentally different in the portlet between jetty and tomcat.


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?




--
Joe Bohn [EMAIL PROTECTED]

"He is no fool who gives what he cannot keep, to gain what he cannot lose."   
-- Jim Elliot

Reply via email to