Support log pattern properties with logback

Update AbstractLoggingSystem to pass LoggingInitializationContext to
loadDefaults() method to enable access to the environment.
DefaultLogbackConfiguration now uses this to find log pattern overrides.

Fixes gh-3367
Closes gh-3405
This commit is contained in:
Rob Baily
2015-07-02 09:53:09 -04:00
committed by Phillip Webb
parent 1fab23c514
commit 177ea459f1
8 changed files with 96 additions and 14 deletions

View File

@@ -57,6 +57,8 @@ content into your application; rather pick only the properties that you need.
logging.file=myapp.log
logging.config= # location of config file (default classpath:logback.xml for logback)
logging.level.*= # levels for loggers, e.g. "logging.level.org.springframework=DEBUG" (TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF)
logging.pattern.console= # appender pattern for output to the console (only supported with the default logback setup)
logging.pattern.file= # appender pattern for output to the file (only supported with the default logback setup)
# IDENTITY ({sc-spring-boot}/context/ContextIdApplicationContextInitializer.{sc-ext}[ContextIdApplicationContextInitializer])
spring.application.name=