public class MXLoggerFactory extends java.lang.Object implements FixedLoggerNames, MaximoCache
appenderPrefix, LOGGERNAME_APP, LOGGERNAME_CRONTASK, LOGGERNAME_CRONTASKMGR, LOGGERNAME_DBCONNECTION, LOGGERNAME_DD, LOGGERNAME_DM, LOGGERNAME_DMPREVIEW, LOGGERNAME_EVENT, LOGGERNAME_EXCEPTION, LOGGERNAME_MAIL, LOGGERNAME_MAXIMO, LOGGERNAME_MT, LOGGERNAME_NULLMBOPOINTER, LOGGERNAME_SECURITY, LOGGERNAME_SENDFAILED, LOGGERNAME_SERVICE, LOGGERNAME_SQL, LOGGERNAME_SQL_CRONTASKMGR, LOGGERNAME_TXN, loggerPrefix
Modifier and Type | Method and Description |
---|---|
void |
addLogger(java.lang.String key,
Log4jLogger logger) |
static void |
applySettings(boolean startup)
Reload logging configurations from database tables and apply the settings.
|
static java.lang.String |
generateLoggingProperties()
Generate logging properties from database settings and return the settings as a string.
|
static java.util.Properties |
getDefaultLogSettings() |
static MXLoggerFactory |
getFactory()
Returns the MXLoggerFactory, create one if it has not been created.
|
static MXLogger |
getLogger(java.lang.String key)
Creates a MAXIMO logger instance and returns it, if the instance
is not yet created, otherwise returns the logger instance that's
already created.
|
java.lang.String |
getName()
Returns the name of the cache object.
|
void |
init()
Initialize the cache object.
|
static java.util.Properties |
loadLoggingSettings(boolean startup) |
static java.util.Properties |
loadSettingsFromDB(boolean startup)
Load logging settings from database.
|
static void |
propertyChanged() |
void |
reload()
Reloads the cache object.
|
void |
reload(java.lang.String key)
Initialize a specific component of the cache identified by the key.
|
static void |
resetMAXIMOLogConfiguration() |
public static MXLoggerFactory getFactory()
public static void propertyChanged()
public static MXLogger getLogger(java.lang.String key)
key
- Logkey of the maximo logger without the prefix "log4j.logger.". For example, if the
logger's log key is "log4j.logger.maximo.report", should pass "maximo.report" as parameter.public static java.util.Properties loadLoggingSettings(boolean startup) throws MXException
MXException
public static java.util.Properties getDefaultLogSettings()
public static java.util.Properties loadSettingsFromDB(boolean startup) throws MXException
startup
- Boolean to indicate whether method is called from server startup.MXException
java.rmi.RemoteException
public static java.lang.String generateLoggingProperties() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public static void applySettings(boolean startup) throws MXException
startup
- Boolean flag to indicate whether the method is being called
when the server is starting up, or from the action menu.MXException
public static void resetMAXIMOLogConfiguration()
public void init() throws MXException
MaximoCache
init
in interface MaximoCache
MXException
public void reload() throws MXException
MaximoCache
reload
in interface MaximoCache
MXException
public void reload(java.lang.String key) throws MXException
MaximoCache
reload
in interface MaximoCache
MXException
public void addLogger(java.lang.String key, Log4jLogger logger) throws MXException
MXException
public java.lang.String getName()
MaximoCache
getName
in interface MaximoCache