Package org.glassfish.admin.amx.logging
Interface Logging
-
@Taxonomy(stability=EXPERIMENTAL) @AMXMBeanMetadata(singleton=true, globalSingleton=true, leaf=true) public interface Logging extends AMXProxy, LogQuery
Supports accessing logging information in multiple ways. The following are supported:- Emission of pseudo real-time JMX Notifications when a
log record is created--see
LogRecordEmitter
- Access to existing log file contents--see
LogFileAccess
- Querying for log entries--see
LogQuery
- Since:
- AS 9.0
- Emission of pseudo real-time JMX Notifications when a
log record is created--see
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.admin.amx.logging.LogQuery
LogQuery.Helper
-
-
Field Summary
-
Fields inherited from interface org.glassfish.admin.amx.logging.LogQuery
ALL_RECORDS, FIRST_RECORD, LAST_RECORD, LOWEST_SUPPORTED_QUERY_LEVEL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,String>
getLoggingAttributes()
Gets the configuration properties for loggingMap<String,String>
getLoggingProperties()
Gets all the logging properties in the logging.properties fileString
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 moduleName, 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.void
updateLoggingAttributes(Map<String,String> properties)
Sets the value of one or more of the logging configuration properties .void
updateLoggingProperties(Map<String,String> properties)
Sets the log level of the Logger for the specified module.-
Methods inherited from interface org.glassfish.admin.amx.core.AMX_SPI
getChildren, getName, getParent
-
Methods inherited from interface org.glassfish.admin.amx.core.AMXProxy
as, attributeNames, attributesMap, attributesMap, child, child, childrenMap, childrenMap, childrenMaps, childrenSet, extra, invokeOp, invokeOp, java, nameProp, objectName, parent, parentPath, path, type, valid
-
Methods inherited from interface org.glassfish.admin.amx.logging.LogQuery
getDiagnosticCauses, getDiagnosticChecks, getDiagnosticURI, queryServerLog
-
-
-
-
Method Detail
-
setModuleLogLevel
@ManagedOperation(impact=1) @Description("Sets the log level of the Logger for the specified module") void setModuleLogLevel(@Param(name="moduleName") String moduleName, @Param(name="level") 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.- Parameters:
module
- a module name as specified inLogModuleNames
.level
- a log level
-
getModuleLogLevel
@ManagedOperation(impact=0) @Description("Gets the log level of the Logger for the specified module") String getModuleLogLevel(@Param(name="moduleName") 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.- Parameters:
moduleName
- a module name as specified inLogModuleNames
-
updateLoggingProperties
@ManagedOperation(impact=1) @Description("Sets the value of one or more logging properties") void updateLoggingProperties(@Param(name="properties") Map<String,String> properties)
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.
-
getLoggingProperties
@ManagedAttribute @Description("Gets all the logging properties") Map<String,String> getLoggingProperties()
Gets all the logging properties in the logging.properties file
-
getLoggingAttributes
@ManagedAttribute @Description("Get logging configuration properties") Map<String,String> getLoggingAttributes()
Gets the configuration properties for logging
-
updateLoggingAttributes
@ManagedOperation(impact=1) @Description("Set value of the value of one or more of the logging configuration properties.") void updateLoggingAttributes(@Param(name="properties") Map<String,String> properties)
Sets the value of one or more of the logging configuration properties .
-
testEmitLogMessage
@ManagedOperation(impact=0) void testEmitLogMessage(@Param(name="level") String level, @Param(name="message") 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()
-
-