Java EE 5 SDK

com.sun.appserv.management.ext.logging
Interface Logging

All Superinterfaces:
AMX, AMXMBeanLogging, ListenerInfo, LogAnalyzer, LogFileAccess, LogQuery, LogRecordEmitter, NotificationBroadcaster, NotificationEmitter

public interface Logging
extends LogRecordEmitter, LogQuery, LogFileAccess, LogAnalyzer, AMX

Supports accessing logging information in multiple ways. The following are supported:

A Logging always has j2eeType=XTypes.LOGGING and the same name as the server it represents.

Since:
AS 9.0
See Also:
ServerRootMonitor.getLogging()

Field Summary
static String J2EE_TYPE
           
 
Fields inherited from interface com.sun.appserv.management.ext.logging.LogRecordEmitter
ALL_LOG_RECORD_NOTIFICATION_TYPES, LOG_RECORD_AS_STRING_KEY, LOG_RECORD_CONFIG_NOTIFICATION_TYPE, LOG_RECORD_FINE_NOTIFICATION_TYPE, LOG_RECORD_FINER_NOTIFICATION_TYPE, LOG_RECORD_FINEST_NOTIFICATION_TYPE, LOG_RECORD_INFO_NOTIFICATION_TYPE, LOG_RECORD_KEY_PREFIX, LOG_RECORD_LEVEL_KEY, LOG_RECORD_LOGGER_NAME_KEY, LOG_RECORD_MESSAGE_KEY, LOG_RECORD_MILLIS_KEY, LOG_RECORD_NOTIFICATION_PREFIX, LOG_RECORD_OTHER_NOTIFICATION_TYPE, LOG_RECORD_ROOT_CAUSE_KEY, LOG_RECORD_SEQUENCE_NUMBER_KEY, LOG_RECORD_SEVERE_NOTIFICATION_TYPE, LOG_RECORD_SOURCE_CLASS_NAME_KEY, LOG_RECORD_SOURCE_METHOD_NAME_KEY, LOG_RECORD_THREAD_ID_KEY, LOG_RECORD_THROWN_KEY, LOG_RECORD_WARNING_NOTIFICATION_TYPE
 
Fields inherited from interface com.sun.appserv.management.ext.logging.LogQuery
ALL_RECORDS, FIRST_RECORD, LAST_RECORD, LOWEST_SUPPORTED_QUERY_LEVEL
 
Fields inherited from interface com.sun.appserv.management.ext.logging.LogFileAccess
ACCESS_KEY, MOST_RECENT_NAME, SERVER_KEY
 
Fields inherited from interface com.sun.appserv.management.ext.logging.LogAnalyzer
MODULE_NAME_KEY, SEVERE_COUNT_KEY, TIMESTAMP_KEY, WARNING_COUNT_KEY
 
Fields inherited from interface com.sun.appserv.management.base.AMX
FULL_TYPE_DELIM, GROUP_CONFIGURATION, GROUP_JSR77, GROUP_MONITORING, GROUP_OTHER, GROUP_UTILITY, J2EE_TYPE_KEY, JMX_DOMAIN, NAME_KEY, NO_NAME, NOTIFICATION_PREFIX, NULL_NAME
 
Method Summary
 String getModuleLogLevel(String moduleName)
          Gets the log level of the Logger for the specified module, which may or may not be the same as that found in the configuration.
 void setModuleLogLevel(String module, String level)
          Sets the log level of the Logger for the specified module.
 void testEmitLogMessage(String level, String message)
          This method may be used to verify that your Logging listener is working correctly.
 
Methods inherited from interface com.sun.appserv.management.ext.logging.LogRecordEmitter
getLogLevelListenerCount
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 
Methods inherited from interface com.sun.appserv.management.base.ListenerInfo
getListenerCount, getNotificationTypeListenerCount
 
Methods inherited from interface com.sun.appserv.management.ext.logging.LogQuery
getDiagnosticCauses, getDiagnosticChecks, getDiagnosticURI, queryServerLog
 
Methods inherited from interface com.sun.appserv.management.ext.logging.LogFileAccess
getLogFile, getLogFileKeys, getLogFileNames, rotateAllLogFiles, rotateLogFile
 
Methods inherited from interface com.sun.appserv.management.ext.logging.LogAnalyzer
getErrorDistribution, getErrorInfo, getErrorStatisticsIntervalMinutes, getKeepErrorStatisticsForIntervals, getLoggerNames, getLoggerNamesUnder, setErrorStatisticsIntervalMinutes, setKeepErrorStatisticsForIntervals
 
Methods inherited from interface com.sun.appserv.management.base.AMX
getContainer, getDomainRoot, getFullType, getGroup, getJ2EEType, getName, isDAS
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 
Methods inherited from interface com.sun.appserv.management.base.AMXMBeanLogging
getMBeanLoggerName, getMBeanLogLevel, setMBeanLogLevel
 

Field Detail

J2EE_TYPE

static final String J2EE_TYPE
See Also:
Constant Field Values
Method Detail

setModuleLogLevel

void setModuleLogLevel(String module,
                       String level)
Sets the log level of the Logger for the specified module. This operation will not effect a change to the corresponding loggin configuration for that module. This capability is subject to removal, due to the confusion caused by configuration settings not matching.

Parameters:
module - a module name as specified in LogModuleNames.
level - a log level
See Also:
ModuleLogLevelsConfig

getModuleLogLevel

String getModuleLogLevel(String moduleName)
Gets the log level of the Logger for the specified module, which may or may not be the same as that found in the configuration. This capability is subject to removal, due to the confusion caused by configuration settings not matching.

Parameters:
moduleName - a module name as specified in LogModuleNames
See Also:
ModuleLogLevelsConfig

testEmitLogMessage

void testEmitLogMessage(String level,
                        String message)
This method may be used to verify that your Logging listener is working correctly.

Parameters:
level - the log level of the log message.
message - the message to be placed in Notif.getMessage()

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.