I'm a newbie to Java Play and I want to capture a request body and its corresponding response in the Java Play 2.5x framework. The goal is to log the requests and responses of APIs that fail N times per minute. I am using SLF4J for my logs. Also, when I am logging, I want to white out certain sensitive information such as credit card numbers or bank account numbers. How do I go about doing this? Please help
Filters is the best point for it:
https://www.playframework.com/documentation/2.5.x/JavaHttpFilters#A-simple-logging-filter
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.