psdi.util.logging

Class MXLoggerFactory

  • java.lang.Object
    • psdi.util.logging.MXLoggerFactory
    • Method Detail

      • getDBManageFactory

        public static MXLoggerFactory getDBManageFactory()
        Returns the MXLoggerFactory, create one if it has not been created. If the server is not up yet, use boottrap logging properties.
        Returns:
      • getFactory

        public static MXLoggerFactory getFactory()
        Returns the MXLoggerFactory, create one if it has not been created. If the server is not up yet, use boottrap logging properties.
        Returns:
      • propertyChanged

        public static void propertyChanged()
      • getLogger

        public 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.
        Parameters:
        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.
        Returns:
        MXLogger a MAXIMO logger instance based on the given log key.
      • loadLoggingSettings

        public static java.util.Properties loadLoggingSettings(boolean startup)
                                                        throws MXException
        Throws:
        MXException
      • getDefaultLogSettings

        public static java.util.Properties getDefaultLogSettings()
      • loadSettingsFromDB

        public static java.util.Properties loadSettingsFromDB(boolean startup)
                                                       throws MXException
        Load logging settings from database. A JDBC connection is used for this purpose since a Maximo database connection maybe not be available if method is called upon server startup.
        Parameters:
        startup - Boolean to indicate whether method is called from server startup.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • generateLoggingProperties

        public static java.lang.String generateLoggingProperties()
                                                          throws MXException,
                                                                 java.rmi.RemoteException
        Generate logging properties from database settings and return the settings as a string.
        Returns:
        Logging properties in a String.
        Throws:
        MXException
        java.rmi.RemoteException
      • applySettings

        public static void applySettings(boolean startup)
                                  throws MXException
        Reload logging configurations from database tables and apply the settings.
        Parameters:
        startup - Boolean flag to indicate whether the method is being called when the server is starting up, or from the action menu.
        Throws:
        MXException
      • resetMAXIMOLogConfiguration

        public static void resetMAXIMOLogConfiguration()
      • reload

        public void reload()
                    throws MXException
        Description copied from interface: MaximoCache
        Reloads the cache object. This will be called by the app server whenever the cache needs to be refreshed. Don't call this method directly. Instead call MXServer.reloadCache(String, boolean).
        Specified by:
        reload in interface MaximoCache
        Throws:
        MXException
      • reload

        public void reload(java.lang.String key)
                    throws MXException
        Description copied from interface: MaximoCache
        Initialize a specific component of the cache identified by the key. E.g. In Maxvars, a specific maxvar can be reinitiliazed from the database. Don't call this method directly. Instead call MXServer.reloadCache(String, String, boolean).
        Specified by:
        reload in interface MaximoCache
        Throws:
        MXException
      • getName

        public java.lang.String getName()
        Description copied from interface: MaximoCache
        Returns the name of the cache object. Should be unique within the app server. This name is used to uniquely identify the cache object among all cached object for both accessing the cache object as well as refreshing the cache object. Ex. MaximoDD returns "MAXIMODD"
        Specified by:
        getName in interface MaximoCache
        Returns: