Commit df1dede5 authored by Phillip Webb's avatar Phillip Webb

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
parent fc2e616c
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment