org.springframework.boot.logging
Class LoggingSystem

java.lang.Object
  extended by org.springframework.boot.logging.LoggingSystem
Direct Known Subclasses:
AbstractLoggingSystem

public abstract class LoggingSystem
extends Object

Common abstraction over logging systems.

Author:
Phillip Webb, Dave Syer

Constructor Summary
LoggingSystem()
           
 
Method Summary
abstract  void beforeInitialize()
          Reset the logging system to be limit output.
static LoggingSystem get(ClassLoader classLoader)
          Detect and return the logging system in use.
abstract  void initialize()
          Initialize the logging system using sensible defaults.
abstract  void initialize(String configLocation)
          Initialize the logging system from a logging configuration location.
abstract  void setLogLevel(String loggerName, LogLevel level)
          Sets the logging level for a given logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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() to reduce logging noise until the systems has been full Initialized.


initialize

public abstract void initialize()
Initialize the logging system using sensible defaults. This method should generally try to find system specific configuration on classpath before falling back to sensible defaults.


initialize

public abstract void initialize(String configLocation)
Initialize the logging system from a logging configuration location.

Parameters:
configLocation - a log configuration location

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.

Returns:
The logging system


Copyright © 2013. All Rights Reserved.