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
pull/2136/merge
Phillip Webb 10 years ago
parent fc2e616cc2
commit df1dede57f

@ -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);

Loading…
Cancel
Save