For pre-initialization phase use console only
Added basic-* log configuration files that are loaded in the beforeInitialization() phase. They don't contain any file logger so no empty spring.log is ever created. Fixes gh-303pull/382/head
parent
825fc2f7df
commit
e663b44f94
@ -0,0 +1,11 @@
|
||||
handlers = java.util.logging.ConsoleHandler
|
||||
.level = INFO
|
||||
|
||||
java.util.logging.ConsoleHandler.formatter = org.springframework.boot.logging.java.SimpleFormatter
|
||||
java.util.logging.ConsoleHandler.level = ALL
|
||||
|
||||
org.hibernate.validator.internal.util.Version.level = WARNING
|
||||
org.apache.coyote.http11.Http11NioProtocol.level = WARNING
|
||||
org.crsh.plugin.level = WARNING
|
||||
org.apache.tomcat.util.net.NioSelectorPool.level = WARNING
|
||||
org.apache.catalina.startup.DigesterFactory.level = SEVERE
|
@ -0,0 +1,15 @@
|
||||
log4j.rootCategory=INFO, CONSOLE, FILE
|
||||
|
||||
PID=????
|
||||
LOG_PATTERN=[%d{yyyy-MM-dd HH:mm:ss.SSS}] boot%X{context} - ${PID} %5p [%t] --- %c{1}: %m%n
|
||||
|
||||
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
|
||||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.CONSOLE.layout.ConversionPattern=${LOG_PATTERN}
|
||||
|
||||
log4j.category.org.hibernate.validator.internal.util.Version=WARN
|
||||
log4j.category.org.apache.coyote.http11.Http11NioProtocol=WARN
|
||||
log4j.category.org.crsh.plugin=WARN
|
||||
log4j.category.org.apache.tomcat.util.net.NioSelectorPool=WARN
|
||||
log4j.category.org.apache.catalina.startup.DigesterFactory=ERROR
|
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<included>
|
||||
<property name="CONSOLE_LOG_PATTERN" value="%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t{14}]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex"/>
|
||||
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
|
||||
<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>
|
||||
|
||||
<appender name="DEBUG_LEVEL_REMAPPER" class="org.springframework.boot.logging.logback.LevelRemappingAppender">
|
||||
<destinationLogger>org.springframework.boot</destinationLogger>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</root>
|
||||
|
||||
<logger name="org.hibernate.validator.internal.util.Version" level="WARN"/>
|
||||
<logger name="org.apache.coyote.http11.Http11NioProtocol" level="WARN"/>
|
||||
<logger name="org.crsh.plugin" level="WARN"/>
|
||||
<logger name="org.apache.tomcat.util.net.NioSelectorPool" level="WARN"/>
|
||||
<logger name="org.apache.catalina.startup.DigesterFactory" level="ERROR"/>
|
||||
<logger name="org.thymeleaf" additivity="false">
|
||||
<appender-ref ref="DEBUG_LEVEL_REMAPPER"/>
|
||||
</logger>
|
||||
|
||||
</included>
|
Loading…
Reference in New Issue