org.springframework.boot.logging

Class LoggingSystem

  • Direct Known Subclasses:
    AbstractLoggingSystem


    public abstract class LoggingSystem
    extends Object
    Common abstraction over logging systems.
    Author:
    Phillip Webb, Dave Syer
    • Constructor Detail

      • LoggingSystem

        public LoggingSystem()
    • Method Detail

      • beforeInitialize

        public abstract void beforeInitialize()
        Reset the logging system to be limit output. This method may be called before initialize(String, String) to reduce logging noise until the systems has been fully Initialized.
      • initialize

        public abstract void initialize(String configLocation,
                      String logFile)
        Fully initialize the logging system.
        Parameters:
        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
      • setLogLevel

        public abstract void setLogLevel(String loggerName,
                       LogLevel level)
        Sets the logging level for a given logger.
        Parameters:
        loggerName - the name of the logger to set
        level - the log level
      • get

        public static LoggingSystem get(ClassLoader classLoader)
        Detect and return the logging system in use. Supports Logback, Log4J, Log4J2 and Java Logging.
        Returns:
        The logging system

Copyright © 2014 Pivotal Software, Inc.. All rights reserved.