Sun Java System Message Queue 4.2 Developer's Guide for JMX Clients

Log Monitor

Each broker has a single log monitor MBean, used for monitoring Message Queue logging.

Object Name

The log monitor MBean has the following object name:

com.sun.messaging.jms.server:type=Log,subtype=Monitor

A string representing this object name is defined as a static constant LOG_MONITOR_MBEAN_NAME in the utility class MQObjectName.

Notifications

The log monitor MBean supports the notifications shown in Table 3–87. These notifications are instances of the Message Queue JMX class LogNotification, and their names are defined as static utility constants in that class.


Note –

A notification listener registered for a particular logging level will receive notifications only for that level and not for those above or below it: for example, a listener registered for the notification mq.log.level.WARNING will be notified only of WARNING messages and not ERROR or INFO. To receive notifications for more than one logging level, the listener must be explicitly registered for each level separately.


Table 3–87 Log Monitor Notifications

Name 

Utility Constant 

Description 

mq.log.level.ERROR

LogNotification.LOG_LEVEL_ERROR

Error message logged 

mq.log.level.WARNING

LogNotification.LOG_LEVEL_WARNING

Warning message logged 

mq.log.level.INFO

LogNotification.LOG_LEVEL_INFO

Informational message logged 

Table 3–88 shows the methods defined in class LogNotification for obtaining details about a log monitor notification.

Table 3–88 Data Retrieval Methods for Log Monitor Notifications

Method 

Result Type 

Description 

getLevel

String

Logging level of logged message 

See Table 3–85 for possible values.

getMessage

String

Body of logged message