Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3343

Add ability to use exclusion pattern filter on Map Resolver keys

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • JsonTemplateLayout
    • None

    Description

      Map Resolver currently supports specifying a pattern to filter for allowed keys in the map being resolved. I'd like a complementary feature to specify a pattern to filter for excluded keys from the map being resolved. It may also be beneficial to provide a similar option for excluded keys as full string matches rather than always using a pattern.

      For an example use case, suppose I copy request HTTP header names and values into the ThreadContext for every request. In Spinnaker microservices, this includes custom headers like X-Spinnaker-Groups which contains a list of groups the authenticated user belongs to which are filled in by the Fiat microservice (used for integrating authentication and authorization with various providers and providing a facade over Spring Security). If I want to exclude this header from being logged, I can currently set a negative lookahead pattern like (?i(?!x-spinnaker-groups)) which works effectively the same, but how many developers like reading regex incantations like these?

      Attachments

        Activity

          People

            mattsicker Matt Sicker
            mattsicker Matt Sicker
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: