[ https://issues.apache.org/jira/browse/SLING-12449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-12449. -------------------------------------- Resolution: Won't Fix Closing based on the discussion in https://github.com/apache/sling-org-apache-sling-commons-log/pull/19 > 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 > Assignee: Nicola Scendoni > Priority: Major > > 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)