Class LoggingSystem

    • Method Detail

      • initialize

        public void initialize​(LoggingInitializationContext initializationContext,
                               String configLocation,
                               LogFile logFile)
        Fully initialize the logging system.
        Parameters:
        initializationContext - the logging initialization context
        configLocation - a log configuration location or null if default initialization is required
        logFile - the log output file that should be written or null for console only output
      • cleanUp

        public void cleanUp()
        Clean up the logging system. The default implementation does nothing. Subclasses should override this method to perform any logging system-specific cleanup.
      • getShutdownHandler

        public Runnable getShutdownHandler()
        Returns a Runnable that can handle shutdown of this logging system when the JVM exits. The default implementation returns null, indicating that no shutdown is required.
        Returns:
        the shutdown handler, or null
      • setLogLevel

        public void setLogLevel​(String loggerName,
                                LogLevel level)
        Sets the logging level for a given logger.
        Parameters:
        loggerName - the name of the logger to set (null can be used for the root logger).
        level - the log level (null can be used to remove any custom level for the logger and use the default configuration instead)
      • get

        public static LoggingSystem get​(ClassLoader classLoader)
        Detect and return the logging system in use. Supports Logback and Java Logging.
        Parameters:
        classLoader - the classloader
        Returns:
        the logging system