Logs data can be masked based on Java regular expressions. (https://docs.oracle.com/javase/tutorial/essential/regex/index.html)
Example - mask credit card number from log files or mask only the password from connection URL.
String like: My master card number number "4444333322221111" will be masked to "My master card number number "****************"
String like: "nigel:pass@host.com" will be masked to "nigel:******@host.com"