I need to mask the password before it gets displayed in the log file.
the format of the password is "password":"pswd123". it's alphanumeric only. After masking, it'd be "password":"*"
in my custom Pattern class, I've the following reg expression but it's not being picked up. any idea how it should be? thx
@Override
public String format(LoggingEvent event) {
String msg = super.format(event);
// regexp not being picked up
msg = msg.replace("\"password\":\"[^\"]*", "password:\"***\"");
return msg;
}