Database Reference
In-Depth Information
Figure9-3.The java.util.logging.Logger MBean allows you to set a logger's log level
Note that the parameter names are not available to the JMX agent; they're just labeled as
p0
,
p1
, etc. That's because the Java compiler “forgot” the parameter names during compilation. So
in order to know what parameters to set, you'll need to look at the JavaDoc for the particular
MBean you're working with. In the case of
java.util.logging.Logger
, this class implements
an interface called
java.util.logging.LoggingMXBean
, which wraps it for instrumentation.
To find out what the right parameters are, we examine the JavaDoc for this class and see that
p0
is the name of the logger you want to change, and
p1
is the logging level you want to set that
logger to.
NOTE
If it's not obvious, setting the logging level for
java.util.logging
won't help you much if that's not
what your application is using for logging. It's just used here as a general example because it's easy to
understand and serves as a gentle introduction. But Cassandra does not use that logging package.