Getting a Response header into the logback logs
Crawford, Jeffrey
jcrawford at it.ucla.edu
Tue Jan 26 01:32:22 UTC 2021
________________________________
From: users <users-bounces at shibboleth.net> on behalf of Cantor, Scott <cantor.2 at osu.edu>
Sent: Monday, January 25, 2021 3:53 PM
To: Shib Users <users at shibboleth.net>
Subject: Re: Getting a Response header into the logback logs
On 1/25/21, 5:44 PM, "users on behalf of Crawford, Jeffrey" <users-bounces at shibboleth.net on behalf of jcrawford at it.ucla.edu> wrote:
> We need to print the content of an "X-Request-ID" header into our shibboleth logs it doesn't seem like the encoder
> supports the %header{key} pattern, What would be the best way to print the content of that header in the logback logs in
> logback.xml
I don't think you could convert the PatternLayoutEncoder class in the appender into the logback-access version but the worst that can happen is it breaks so I guess it's a possibility.
Otherwise you'd have to write a Java filter to add to the MDC.
Forgive the probably silly question but where would be an appropriate way to add this? Assuming that we don't want to update the base code. More like a deployer type hook, feel free to point me to documentation
Thanks,
Jeffrey C.
-- Scott
--
For Consortium Member technical support, see https://wiki.shibboleth.net/confluence/x/coFAAg
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20210126/c93cb38e/attachment.htm>
More information about the users
mailing list