Oscar Palladino created LOGBACK-1459:
----------------------------------------
Summary: Message replace won't work when checking a regex text
inside another exception
Key: LOGBACK-1459
URL: https://jira.qos.ch/browse/LOGBACK-1459
Project: logback
Issue Type: Bug
Components: logback-core
Affects Versions: 1.2.3
Environment: Windows 10
Spring boot 2.1.3
Spring ingegration 5.1.3
Reporter: Oscar Palladino
Assignee: Logback dev list
Hello,
I am trying to mask a token in the logs, and in order to do so i am using this
pattern :
{code:java}
<pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] - ${PID:-????} %5p [%t] --- %c{1}:
%replace(%msg){'Bearer\s[0-9a-zA-Z_\.\n\r-]{798}','***'}%n</pattern>
{code}
This pattern works well but when said token is to be found inside another
exception (nested). In that case the regex expression fails to replace it.
This happens to me in the class MessagePublishingErrorHandler of spring
integration when printing a stacktrace that at the bottom contains the message
with the header.
Could you please have a look at that?
Thanks
--
This message was sent by Atlassian JIRA
(v7.3.1#73012)
_______________________________________________
logback-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-dev