Apache Sling SLF4J MDC Filter

Clone this repo:
  1. e1eeb6e SLING-7157 : metatype.properties file must not be in OSGI-INF/metatype by Carsten Ziegeler · 5 weeks ago master
  2. 185656f Updating badges for org-apache-sling-extensions-slf4j-mdc by Radu Cotescu · 1 year, 4 months ago
  3. 2d624aa SLING-7245 - Validate pull requests using Jenkins by Robert Munteanu · 1 year, 4 months ago
  4. d8e0f3d trivial: added license header to *.md files by Radu Cotescu · 1 year, 8 months ago
  5. 06d8173 SLING-7215 - [nice-to-have] Add a CONTRIBUTING file to every module by Radu Cotescu · 1 year, 8 months ago

Build Status Test Status Maven Central JavaDocs 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