Nicola Scendoni created SLING-12449:
---------------------------------------
Summary: Allow to log custom attribute like x-request-id http
header
Key: SLING-12449
URL: https://issues.apache.org/jira/browse/SLING-12449
Project: Sling
Issue Type: Improvement
Components: Commons
Reporter: Nicola Scendoni
Currently {{org-apache-sling-commons-log}} allow to log using
{{java.util.MessageFormat}} pattern with following arguments:
{code:java}
{2} the name of the current thread,
{3} the name of the logger,
{4} the debug level and
{5} the actual debug message
{code}
It would be useful to log also an custom id for the request stored in MDC,
often a Http Header like {{{}x-request-id{}}}.
I propose to extend it to add:
{code:java}
{6} id of the request{code}
The parameter \{6} can be specified in a filter or an authentication handler
using:
{code:java}
import org.slf4j.MDC;
...
MDC.put("xrequestid",xRequestID); {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)