Substitute ${PID} variables with file logging

Update DefaultLogbackConfiguration to include OptionHelper.substVars
when setting the encoder pattern so that ${PID} is correctly expanded.

Fixes gh-2119
This commit is contained in:
Phillip Webb 2014-12-12 18:56:34 -08:00
parent fc2e616cc2
commit df1dede57f
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ class DefaultLogbackConfiguration {
String logFile) {
RollingFileAppender<ILoggingEvent> appender = new RollingFileAppender<ILoggingEvent>();
PatternLayoutEncoder encoder = new PatternLayoutEncoder();
encoder.setPattern(FILE_LOG_PATTERN);
encoder.setPattern(OptionHelper.substVars(FILE_LOG_PATTERN, config.getContext()));
appender.setEncoder(encoder);
config.start(encoder);