Skip to content

setting providers #990

Answered by philsttr
leksmano asked this question in Q&A
Discussion options

You must be logged in to vote

LoggingEventCompositeJsonEncoder

LoggingEventCompositeJsonEncoder allows the <providers> element. And LoggingEventCompositeJsonEncoder is what is being used in the documentation you referenced.

If you want to use the ShortenedThrowableConverter with a LoggingEventCompositeJsonEncoder, then you add the stackTrace provider with a throwableConverter element.

<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
    <providers>
        ... snip ... other providers
        <stackTrace>
            <throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter">
                ... snip ... ShortenedThrowableConverter configuration
            </t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by philsttr
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