Skip to content

Mask or remove specific words from log line #828

@router19

Description

@router19

Hi
I have a requirement wherein I would want to match a specific regex and dont allow words matching such regex to be logged.

I explored logback matcher but it removed the complete formated message. I need only a specific word matching regex in the formatted message to be removed or replaced with some characters say *

Example

Formatted message :
I love logback library as it is best.

Ouput I want if logback matches the regex :
I love library as it is best
Or
I love ******* library as it is best

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions