controlling the jolokia logs to a tomcat xyz.txt logs

classic Classic list List threaded Threaded
2 messages Options
curt504 curt504
Reply | Threaded
Open this post in threaded view
|

controlling the jolokia logs to a tomcat xyz.txt logs

Greetings.  Please direct me to the user manual etc.  I'm the guy who's tuning up our product to fit and work in a production env.  Another fellow did the development.  I notice alot of jolokia loging to the tomcat (v5) logs directory to the interface-date.txt files.

IE: 2011-04-13 11:01:17 StandardContext[/iphone]jolokia-agent: Response: {"timestamp":1302706877,"request":{"mbean":"AIP2:name=AIPCentral,type=general","type":"read"},"value":{"DefaultEventTimeoutMs":"10000","Started":"true","BridgeAdapterCount":"7","BridgeAdapterNames":"[\"3\", \"Lacross\", \"2\", \"1\", \"mock\", \"5\", \"4\"]","Host":"10.62.35.43","StartedDateAsString":"Apr 13, 2011 10:23:04 AM","ActiveConferenceCount":"0","ConferenceTimeoutMs":"7200000"}}
2011-04-13 11:01:17 StandardContext[/iphone]jolokia-agent: Response: {"timestamp":1302706877,"status":200,"request":{"mbean":"AIP2:name=AIPCentral,type=general","type":"read"},"value":{"DefaultEventTimeoutMs":"10000","Started":"true","BridgeAdapterCount":"7","BridgeAdapterNames":"[\"3\", \"Lacross\", \"2\", \"1\", \"mock\", \"5\", \"4\"]","Host":"10.62.35.43","StartedDateAsString":"Apr 13, 2011 10:23:04 AM","ActiveConferenceCount":"0","ConferenceTimeoutMs":"7200000"}}
2011-04-13 11:01:18 StandardContext[/iphone]jolokia-agent: URI: /iphone/jolokia
2011-04-13 11:01:18 StandardContext[/iphone]jolokia-agent: Execution time: 1 ms
2011-04-13 11:

This war has a log4j.properties file so any 3rd party jars who use log4j logging would be caught and use our application log dir and file name.  

How do you suggest I move this jolokia's logging to our application directory and to control the logging level, like tune it down to warning level?

tnx curt
roland roland
Reply | Threaded
Open this post in threaded view
|

Re: controlling the jolokia logs to a tomcat xyz.txt logs

Hi Curt,

currently, logging is always redirected to the servlet's log, which for tomcat is redirected into its own log. There are plans to provide alternative logging hooks (e.g. log4j or logback).

However, Jolokia is very quite in the default mode, writing out only a single line during startup whether a security policy is active or not.

What you see currently is the result, when debugging is switched on. I highly recommend to switch it off for production environments.

This can be done by changing the Jolokia servlet's init-param "debug" in WEB-INF/web.xml within jolokia.war to "false". You have to repackage jolokia.war for this, though.

The debug level can be changed dynamically, too, by setting the attribute "Debug" on the JMX MBean "jolokia:type=Config" to false or true via a JMX call. This value is reset to the init parameter mentioned above after a server restart.

'hope this solves your issue ...
... roland