Skip to content

ShortenedThrowableConverter: <exclude> and <exclusions> are mutually exclusive #876

@brenuart

Description

@brenuart

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    warn/behavior-changeBreaking change of publicly advertised behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions