[logback-user] Truncation of log entry when using a specific sequence of '}]:' characters

Jeffrey Olchovy jeffo at tapad.com
Tue Oct 27 16:45:05 UTC 2015


Hello, I am experiencing an unexpected truncation of part of my log entry when using the SyslogAppender with the following suffixPattern:
<suffixPattern>foo-service[${HOSTNAME}]: %logger %msg</suffixPattern>

The resulting output takes the form:
foo-service[f7e52cff05ba com.tapad.common.cache.SelfRefreshingCache Cache Constraints lookup refreshing…
foo-service[f7e52cff05ba com.tapad.common.cache.SelfRefreshingCache Cache Constraints lookup refreshed and now contains 284 items.

Rather than the expected:
foo-service[f7e52cff05ba]: com.tapad.common.cache.SelfRefreshingCache Cache Constraints lookup refreshing…
foo-service[f7e52cff05ba]: com.tapad.common.cache.SelfRefreshingCache Cache Constraints lookup refreshed and now contains 284 items.

If I add spaces between the intended variable ${HOSTNAME} and the square brackets, the log entries render as one would expect:
foo-service[ 28ed24577053 ]: com.tapad.common.cache.SelfRefreshingCache Cache Constraints lookup refreshing…
foo-service[ 28ed24577053 ]: com.tapad.common.cache.SelfRefreshingCache Cache Constraints lookup refreshed and now contains 284 items.

Are there any known issues or workarounds that either will prevent or resolve this behavior? Or, alternatively, does this smell like something downstream of logback and more at the syslog level?

Thank you.


More information about the logback-user mailing list