Skip to content

ShortenedThrowableConverter : How to exclude frames that contains $ (dollar sign)? #863

Answered by brenuart
hexwit asked this question in Q&A
Discussion options

You must be logged in to vote

Exclude patterns are REGEX expressions for which the dollar sign and the dot have special meanings (respectively end of line and any single character).
In your case you want to match the dollar and the dot literals so you need to ESCAPE them as follows:

<encoder class="net.logstash.logback.encoder.LogstashEncoder">
    <throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
        <exclude>^io\.proj\..*\$\$FastClassBySpringCGLIB\$\$.*</exclude>
        <exclude>^org\.springframework\.security\.web\.FilterChainProxy\$VirtualFilterChain.*</exclude>
    </throwableConverter>
</encoder>

That said, the converter effectively removes stack trace elements ONLY i…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@hexwit
Comment options

@hexwit
Comment options

@brenuart
Comment options

Answer selected by hexwit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants