Example usage for org.springframework.boot.logging LoggingSystem cleanUp

List of usage examples for org.springframework.boot.logging LoggingSystem cleanUp

Introduction

In this page you can find the example usage for org.springframework.boot.logging LoggingSystem cleanUp.

Prototype

public void cleanUp() 

Source Link

Document

Clean up the logging system.

Usage

From source file:org.springframework.boot.context.logging.LoggingApplicationListenerTests.java

@After
public void clear() {
    LoggingSystem loggingSystem = LoggingSystem.get(getClass().getClassLoader());
    loggingSystem.setLogLevel("ROOT", LogLevel.INFO);
    loggingSystem.cleanUp();
    System.clearProperty(LoggingSystem.class.getName());
    System.clearProperty(LoggingSystemProperties.LOG_FILE);
    System.clearProperty(LoggingSystemProperties.LOG_PATH);
    System.clearProperty(LoggingSystemProperties.PID_KEY);
    System.clearProperty(LoggingSystemProperties.EXCEPTION_CONVERSION_WORD);
    System.clearProperty(LoggingSystemProperties.CONSOLE_LOG_PATTERN);
    System.clearProperty(LoggingSystemProperties.FILE_LOG_PATTERN);
    System.clearProperty(LoggingSystemProperties.LOG_LEVEL_PATTERN);
    System.clearProperty(LoggingSystem.SYSTEM_PROPERTY);
    if (this.context != null) {
        this.context.close();
    }/*from   ww  w. j av  a 2 s  . c  o m*/
}