Apache Sling SLF4J MDC Filter

Clone this repo:
  1. 83e5136 SLING-12094 - Use GitHub for the Maven scm.url value by Robert Munteanu · 6 months ago master
  2. 43e0c3d SLING-11709 - Set up Jira autolinks to all Sling Github projects by Robert Munteanu · 1 year, 1 month ago
  3. a1b8a0d SLING-11304: upgrade to sling 47 (#1) by Ashok Pelluru · 2 years ago
  4. ec00573 SLING-11051 - Fixing JavaDoc badge by Dan Klco · 2 years, 3 months ago
  5. 00346b5 SLING-10676 - remove SECURITY.md which is not needed by Bertrand Delacretaz · 2 years, 9 months ago

Apache Sling

Build Status Test Status Coverage Sonarcloud Status JavaDoc Maven Central Contrib License

Apache Sling SLF4J MDC Filter

This module is part of the Apache Sling project.

This filter exposes various request details as part of [MDC][1].

Currently it exposes following variables:

  1. req.remoteHost - Request remote host
  2. req.userAgent - User Agent Header
  3. req.requestURI - Request URI
  4. req.queryString - Query String from request
  5. req.requestURL -
  6. req.xForwardedFor -
  7. sling.userId - UserID associated with the request. Obtained from ResourceResolver
  8. jcr.sessionId - Session ID of the JCR Session associated with current request.

The filter also allow configuration to extract data from request cookie, header and parameters. Look for configuration with name ‘Apache Sling Logging MDC Inserting Filter’ for details on specifying header, cookie, param names.

[1] http://www.slf4j.org/manual.html#mdc