org.glassfish.admin.amx.impl.ext
Class LoggingImpl
java.lang.Object
org.glassfish.admin.amx.impl.mbean.MBeanImplBase
org.glassfish.admin.amx.impl.mbean.AMXImplBase
org.glassfish.admin.amx.impl.ext.LoggingImpl
- All Implemented Interfaces:
- javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, AMX_SPI, NotificationSender
@Service
public final class LoggingImpl
- extends AMXImplBase
Implementation of Logging.
The following is a GlassFish V2 comment, and needs work for v3:
AMX Logging MBean is hooked directly into the logging subsystem
via com.sun.enterprise.server.logging.FileandSyslogHandler which uses
com.sun.enterprise.server.logging.AMXLoggingHook to instantiate
and call an instance of LoggingImpl.
|
Constructor Summary |
LoggingImpl(javax.management.ObjectName parent,
java.lang.String serverName)
|
|
Method Summary |
java.lang.String[] |
getDiagnosticCauses(java.lang.String messageID,
java.lang.String moduleName)
|
java.lang.String[] |
getDiagnosticChecks(java.lang.String messageID,
java.lang.String moduleName)
|
java.lang.String |
getDiagnosticURI(java.lang.String messageID)
|
java.util.Map<java.lang.String,java.lang.Integer> |
getErrorDistribution(long timestamp,
java.lang.String level)
|
java.util.Map<java.lang.String,java.lang.Number>[] |
getErrorInfo()
|
long |
getErrorStatisticsIntervalMinutes()
|
int |
getKeepErrorStatisticsForIntervals()
|
java.lang.String[] |
getLogFileKeys()
|
java.lang.String[] |
getLogFileNames(java.lang.String key)
|
java.lang.String[] |
getLoggerNames()
|
java.lang.String[] |
getLoggerNamesUnder(java.lang.String loggerName)
|
java.util.Map<java.lang.String,java.lang.String> |
getLoggingAttributes()
|
java.util.Map<java.lang.String,java.lang.String> |
getLoggingProperties()
|
int |
getLogLevelListenerCount(java.util.logging.Level logLevel)
|
java.lang.String |
getModuleLogLevel(java.lang.String module)
|
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
|
static javax.management.ObjectName |
getObjectName(java.lang.String serverName)
Used internally to get the Logging ObjectName for a particular server
Logging MBean is a special-case because it needs to load as early
as possible. |
protected void |
preRegisterDone()
|
void |
privateLoggingHook(java.util.logging.LogRecord logRecord,
java.util.logging.Formatter formatter)
Internal use only, called by com.sun.enterprise.server.logging.AMXLoggingHook. |
java.util.List<java.io.Serializable[]> |
queryServerLog(java.lang.String name,
long startIndex,
boolean searchForward,
int maximumNumberOfResults,
java.lang.Long fromTime,
java.lang.Long toTime,
java.lang.String logLevel,
java.util.Set<java.lang.String> modules,
java.util.List<javax.management.Attribute> nameValuePairs,
java.lang.String anySearch)
|
void |
rotateAllLogFiles()
|
void |
rotateLogFile(java.lang.String key)
|
void |
setErrorStatisticsIntervalMinutes(long minutes)
|
void |
setKeepErrorStatisticsForIntervals(int num)
|
void |
setModuleLogLevel(java.lang.String module,
java.lang.String level)
|
void |
testEmitLogMessage(java.lang.String level,
java.lang.String message)
|
void |
updateLoggingAttributes(java.util.Map<java.lang.String,java.lang.String> properties)
|
void |
updateLoggingProperties(java.util.Map<java.lang.String,java.lang.String> properties)
|
| Methods inherited from class org.glassfish.admin.amx.impl.mbean.AMXImplBase |
attributeNameToType, attributeTypeMatches, cdebug, child, child, child, findGetter, findMethod, findSetter, getAncestorByType, getAttribute, getAttributeByMethod, getAttributeInfo, getAttributeInfos, getAttributeInternal, getAttributeManually, getAttributeNames, getAttributeNoThrow, getAttributes, getAttributeType, getChildren, getChildren, getChildren, getChildren, getChildrenMap, getDomainRoot, getDomainRootProxy, getLogger, getMBeanInfo, getMBeanTracker, getName, getObjectNameAttribute, getObjectNames, getObjectNamesForAttribute, getParent, getParentProxy, getProxy, getProxyFactory, getSelf, getSelf, getterNameMatches, handleException, handleGetAttributeException, handleInvokeThrowable, impossible, invoke, invokeManually, isReadOnlyAttribute, isUtilityMBean, java, operationNameMatches, postRegisterHook, postRegisterModifyMBeanInfo, preDeregisterHook, preRegister, preRegisterHook, preRegisterModifyName, registerChild, registerChildren, sendAttributeChangeNotification, setAttribute, setAttributeByMethod, setAttributeInternal, setAttributeManually, setAttributes, shouldEmitNotifications, stringify, supportsChildren, toString, unimplementedAttribute, unimplementedOperation, unregisterChildren |
| Methods inherited from class org.glassfish.admin.amx.impl.mbean.MBeanImplBase |
_getMBeanLogLevel, addNotificationListener, addNotificationListener, createNotificationBuilder, debug, debug, debugMethod, debugMethod, enableAMXDebug, getAMXDebug, getDebugID, getDebugOutput, getJMXDomain, getListenerCount, getMBeanLogger, getMBeanLoggerName, getMBeanLogLevel, getMBeanLogLevelInt, getMBeanServer, getNotificationBuilder, getNotificationEmitter, getNotificationTypeListenerCount, getObjectName, logFine, logFiner, logFinest, logInfo, logSevere, logWarning, postDeregister, postDeregisterHook, postRegister, preDeregister, quote, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, setAMXDebug, setMBeanLogLevel, shouldOmitObjectNameForDebug, sleepMillis, toString, trace |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.management.MBeanRegistration |
postDeregister, postRegister, preDeregister |
| Methods inherited from interface javax.management.NotificationEmitter |
removeNotificationListener |
| Methods inherited from interface javax.management.NotificationBroadcaster |
addNotificationListener, removeNotificationListener |
LoggingImpl
public LoggingImpl(javax.management.ObjectName parent,
java.lang.String serverName)
getObjectName
public static javax.management.ObjectName getObjectName(java.lang.String serverName)
- Used internally to get the Logging ObjectName for a particular server
Logging MBean is a special-case because it needs to load as early
as possible.
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfo in interface javax.management.NotificationBroadcaster- Overrides:
getNotificationInfo in class AMXImplBase
setModuleLogLevel
public void setModuleLogLevel(java.lang.String module,
java.lang.String level)
getModuleLogLevel
public java.lang.String getModuleLogLevel(java.lang.String module)
getLoggingProperties
public java.util.Map<java.lang.String,java.lang.String> getLoggingProperties()
updateLoggingProperties
public void updateLoggingProperties(java.util.Map<java.lang.String,java.lang.String> properties)
getLogLevelListenerCount
public int getLogLevelListenerCount(java.util.logging.Level logLevel)
getLogFileKeys
public java.lang.String[] getLogFileKeys()
getLogFileNames
public java.lang.String[] getLogFileNames(java.lang.String key)
getLoggingAttributes
public java.util.Map<java.lang.String,java.lang.String> getLoggingAttributes()
updateLoggingAttributes
public void updateLoggingAttributes(java.util.Map<java.lang.String,java.lang.String> properties)
rotateAllLogFiles
public void rotateAllLogFiles()
rotateLogFile
public void rotateLogFile(java.lang.String key)
queryServerLog
public java.util.List<java.io.Serializable[]> queryServerLog(java.lang.String name,
long startIndex,
boolean searchForward,
int maximumNumberOfResults,
java.lang.Long fromTime,
java.lang.Long toTime,
java.lang.String logLevel,
java.util.Set<java.lang.String> modules,
java.util.List<javax.management.Attribute> nameValuePairs,
java.lang.String anySearch)
getErrorInfo
public java.util.Map<java.lang.String,java.lang.Number>[] getErrorInfo()
getErrorDistribution
public java.util.Map<java.lang.String,java.lang.Integer> getErrorDistribution(long timestamp,
java.lang.String level)
setKeepErrorStatisticsForIntervals
public void setKeepErrorStatisticsForIntervals(int num)
getKeepErrorStatisticsForIntervals
public int getKeepErrorStatisticsForIntervals()
setErrorStatisticsIntervalMinutes
public void setErrorStatisticsIntervalMinutes(long minutes)
getErrorStatisticsIntervalMinutes
public long getErrorStatisticsIntervalMinutes()
getLoggerNames
public java.lang.String[] getLoggerNames()
getLoggerNamesUnder
public java.lang.String[] getLoggerNamesUnder(java.lang.String loggerName)
getDiagnosticCauses
public java.lang.String[] getDiagnosticCauses(java.lang.String messageID,
java.lang.String moduleName)
getDiagnosticChecks
public java.lang.String[] getDiagnosticChecks(java.lang.String messageID,
java.lang.String moduleName)
getDiagnosticURI
public java.lang.String getDiagnosticURI(java.lang.String messageID)
preRegisterDone
protected void preRegisterDone()
throws java.lang.Exception
- Overrides:
preRegisterDone in class AMXImplBase
- Throws:
java.lang.Exception
privateLoggingHook
public void privateLoggingHook(java.util.logging.LogRecord logRecord,
java.util.logging.Formatter formatter)
- Internal use only, called by com.sun.enterprise.server.logging.AMXLoggingHook.
testEmitLogMessage
public void testEmitLogMessage(java.lang.String level,
java.lang.String message)
Copyright © 2012 GlassFish Community. All Rights Reserved.