Neel1210 opened a new issue, #4015:
URL: https://github.com/apache/logging-log4j2/issues/4015
**Description:** Currently, users must develop and maintain custom Log4j2
plugins to mask sensitive data (e.g., emails, phone numbers, tokens). This
creates significant overhead, especially in microservices architectures, where
deploying and updating custom plugin binaries across dozens of services is
difficult to manage.
I propose a native feature that allows users to define multiple regex
patterns within a single configuration. This would eliminate the need for
custom Java code and simplify the rollout of security compliance updates across
distributed systems.
` PatternLayout:
pattern: "%d{yyyy-MM-dd HH:mm:ss} [%t] %-5level %c{1} - %msg%n"
replace:
- regex:
"([A-Za-z0-9._%+-])([A-Za-z0-9._%+-]*)(@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})"
replacement: "[EMAIL MASKED]"
- regex:
"([A-Za-z0-9-_=]+\\.[A-Za-z0-9-_=]+\\.)([A-Za-z0-9-_.+/=]+)"
replacement: "[TOKEN MASKED]"
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]