Package com.sun.identity.log
Class LogManager
- java.lang.Object
-
- java.util.logging.LogManager
-
- com.sun.identity.log.LogManager
-
public class LogManager extends LogManager
This class keeps track of all the logger objects and does all the bookkeeping work. It is extended from JDK'sLogManagerto add functionalities, such as adding our logger listening to DS changes, etc.
-
-
Field Summary
Fields Modifier and Type Field Description static StringFORMATTERThe formatter which depends on the log settingsstatic StringHANDLERThe handler which will be added to each logger objectstatic booleanisLocalIs the Log Service running locally or remotelystatic booleanisMonitoringInitprotected LevelloggingLevel-
Fields inherited from class java.util.logging.LogManager
LOGGING_MXBEAN_NAME
-
-
Constructor Summary
Constructors Constructor Description LogManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddLogger(Logger logger)Adds a logger to the Log Manager.String[]getAllFields()Return the array of all LogRecord fields available for selection.protected StringgetBackend()booleangetDidFirstReadConfig()booleangetLoggingStatusIsActive()SetgetSelectedFieldSet()Return the LogRecord fields selected to be included.protected booleanisDBLogging()booleanisSecure()Return whether secure logging is specified.voidlogStopLogs()voidreadConfiguration()This method overrides thereadConfigurationmethod in JDKLogManagerclass.voidupdateMonitConfigForLogService()This method is called from two places, from readConfiguration() and from Logger.getLoggers().-
Methods inherited from class java.util.logging.LogManager
addConfigurationListener, checkAccess, getLogger, getLoggerNames, getLoggingMXBean, getLogManager, getProperty, readConfiguration, removeConfigurationListener, reset, updateConfiguration, updateConfiguration
-
-
-
-
Field Detail
-
isLocal
public static boolean isLocal
Is the Log Service running locally or remotely
-
HANDLER
public static String HANDLER
The handler which will be added to each logger object
-
FORMATTER
public static String FORMATTER
The formatter which depends on the log settings
-
isMonitoringInit
public static boolean isMonitoringInit
-
loggingLevel
protected Level loggingLevel
-
-
Method Detail
-
addLogger
public boolean addLogger(Logger logger)
Adds a logger to the Log Manager.- Overrides:
addLoggerin classLogManager- Parameters:
logger- Logger object to be added to the Log Manager.- Returns:
- true if the logger is added.
-
isSecure
public final boolean isSecure()
Return whether secure logging is specified.- Returns:
securityStatus
-
getAllFields
public final String[] getAllFields()
Return the array of all LogRecord fields available for selection.- Returns:
allFields
-
getSelectedFieldSet
public final Set getSelectedFieldSet()
Return the LogRecord fields selected to be included.- Returns:
selectedFieldSet
-
readConfiguration
public final void readConfiguration() throws IOException, SecurityExceptionThis method overrides thereadConfigurationmethod in JDKLogManagerclass. The base class method resets the loggers in memory. This method must add handlers to the loggers in memory according to the new configuration.- Overrides:
readConfigurationin classLogManager- Throws:
IOException- if there are IO problems reading the configuration.SecurityException- if a security manager exists and if the caller does not haveLoggingPermission("control").
-
updateMonitConfigForLogService
public void updateMonitConfigForLogService()
This method is called from two places, from readConfiguration() and from Logger.getLoggers().
-
getLoggingStatusIsActive
public boolean getLoggingStatusIsActive()
-
getBackend
protected String getBackend()
-
isDBLogging
protected boolean isDBLogging()
-
getDidFirstReadConfig
public boolean getDidFirstReadConfig()
-
logStopLogs
public void logStopLogs()
-
-