users@glassfish.java.net

Logging and Management Rules Question

From: jsexton0 <jsexton0_at_gmail.com>
Date: Wed, 3 Feb 2010 08:56:30 -0800 (PST)

Hello -

I'm wanting to build a way to do some detailed, application specific, event
monitoring in my application. I'd like this to be configurable, using the
admin console, and not require much special programming in the existing
application code.

My thought is to use an mbean to catch log events from a specificly
designated logger. By using a custom handler that does not call its parents
I could keep the messages out of the regular log file (right?). This
approach seems good since it will work without the mbean, or rule, deployed,
and the code to be added to the application is only ordinary logger calls.
And I can control log levels using the admin console.

I have a question. If the Glassfish admin console is used to set a module's
log level to, say, WARNING, and my special log calls that I don't want to go
into the log file are level INFO, will the self-management rule still
trigger an event and call my mbean?

Secondly, in the above example of level settings, would this do the job for
me of keeping the special messages out of the server log without having to
create a custom handler and logger?

Any other suggestions about this approach, or an alternative? I have also
considered firing custom events in the code I care about, and catching those
with a management rule and mbean.

Thanks!
-- 
View this message in context: http://old.nabble.com/Logging-and-Management-Rules-Question-tp27439669p27439669.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.