List of usage examples for org.springframework.boot.logging LoggingSystemProperties LOG_LEVEL_PATTERN
String LOG_LEVEL_PATTERN
To view the source code for org.springframework.boot.logging LoggingSystemProperties LOG_LEVEL_PATTERN.
Click Source Link
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();/* w w w . j a v a 2 s .co m*/ 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 source file:org.springframework.boot.context.logging.LoggingApplicationListenerTests.java
@Test public void systemPropertiesAreSetForLoggingConfiguration() { TestPropertySourceUtils.addInlinedPropertiesToEnvironment(this.context, "logging.exception-conversion-word=conversion", "logging.file=target/log", "logging.path=path", "logging.pattern.console=console", "logging.pattern.file=file", "logging.pattern.level=level"); this.initializer.initialize(this.context.getEnvironment(), this.context.getClassLoader()); assertThat(System.getProperty(LoggingSystemProperties.CONSOLE_LOG_PATTERN)).isEqualTo("console"); assertThat(System.getProperty(LoggingSystemProperties.FILE_LOG_PATTERN)).isEqualTo("file"); assertThat(System.getProperty(LoggingSystemProperties.EXCEPTION_CONVERSION_WORD)).isEqualTo("conversion"); assertThat(System.getProperty(LoggingSystemProperties.LOG_FILE)).isEqualTo("target/log"); assertThat(System.getProperty(LoggingSystemProperties.LOG_LEVEL_PATTERN)).isEqualTo("level"); assertThat(System.getProperty(LoggingSystemProperties.LOG_PATH)).isEqualTo("path"); assertThat(System.getProperty(LoggingSystemProperties.PID_KEY)).isNotNull(); }