forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 spring-projectsgh-303
- Loading branch information
Dave Syer
committed
Feb 19, 2014
1 parent
825fc2f
commit e663b44
Showing
7 changed files
with
71 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ng-boot/src/main/resources/org/springframework/boot/logging/java/basic-logging.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
15 changes: 15 additions & 0 deletions
15
spring-boot/src/main/resources/org/springframework/boot/logging/log4j/basic-log4j.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
spring-boot/src/main/resources/org/springframework/boot/logging/logback/basic-logback.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters