Suppose the following configuration:
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
<exclude>pattern1</exclude>
<exclusions>${STACK_EXCLUSIONS}</exclusions>
<exclude>pattern2</exclude>
</throwableConverter>
Using the <exclusions> with an environment variable is an easy way to configure additional exclusion patterns in addition to those already configured in the XML file. However, it happens that <exclusions> clears the exclusions already configured and replace them with new values. This sample configuration results in only TWO exclusion patterns with the first one being ignored...
To avoid confusion the <exclusions> keyword should ADD new patterns instead of replacing those already defined.