Question & Answer
Question
How do you use log4j to mask CC information in verbose logs?
Answer
To mask the credit card numbers from the log files you must set up log4j filters.
There is a good write up in the info center @
http://www.ibm.com/support/knowledgecenter/SS6QYM_9.2.0/com.ibm.help.custom.basics.doc/Cstm_mask_info_using_log4j.html?cp=SS6QYM_9.2.0%2F1-14-1-0-0-3-0
First, define an appropriate regular expression of text in the log file and add the same as an additional pattern in their log4j filter configuration.
For example, if you add a new pattern as below in customer_overrrides, then you can replace it with ****
logfilter.filterset.common-filter.pattern.3=(&creditCardNo)=([\w\-]+)&.*
?
logfilter.filterset.common-filter.replace.3=$1=****
Note that, the log4j filters have been provided by the product to enable you to define your own regular expressions and mask any information which you do not want in the log files.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21961304