ShortenedThrowableConverter: <exclude> and <exclusions> are mutually exclusive
brenuart opened this issue · comments
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.
@philsttr What do you think of this?
Sounds good.
I think there is a low probability that anyone is using both.
Worth calling out as a slight backwards incompatibility in the release notes. But I don't think it requires a major version bump, since this seems more like a bugfix.