mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Ensure logging initializer listens to the right event
This should make a difference to gh-196. It might even fix it (depending on what snapshot the user had there).
This commit is contained in:
parent
2377bd9ec9
commit
d6b2ade8df
@ -1,19 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<property name="CONSOLE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%t] --- %-40.40logger{39} : %m%n%wex"/>
|
||||
|
||||
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</root>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
|
||||
<!-- logger name="org.springframework" level="DEBUG"/ -->
|
||||
<!-- logger name="org.springframework" level="DEBUG"/-->
|
||||
|
||||
</configuration>
|
||||
|
@ -26,7 +26,6 @@ import java.util.Map;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.SpringApplicationBeforeRefreshEvent;
|
||||
import org.springframework.boot.SpringApplicationEnvironmentAvailableEvent;
|
||||
import org.springframework.boot.SpringApplicationStartEvent;
|
||||
import org.springframework.boot.logging.LogLevel;
|
||||
@ -97,7 +96,7 @@ public class LoggingApplicationListener implements SmartApplicationListener {
|
||||
private static Collection<Class<? extends ApplicationEvent>> EVENT_TYPES = Arrays
|
||||
.<Class<? extends ApplicationEvent>> asList(
|
||||
SpringApplicationStartEvent.class,
|
||||
SpringApplicationBeforeRefreshEvent.class);
|
||||
SpringApplicationEnvironmentAvailableEvent.class);
|
||||
|
||||
private final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user