简体   繁体   English

如何在tomcat日志文件中混淆请求属性

[英]How to obfuscate request properties in tomcat log file

I have a rest based weapp that runs on tomcat. 我有一个基于Tomcat的基于休息的weapp。 Every time i hit some of the rest endpoints on the server - a log with the request details is written in the log file. 每次我碰到服务器上其余的一些端点时-带有请求详细信息的日志都会写入日志文件中。 How can i configure tomcat to obfuscate the sended values of the json request. 我如何配置tomcat来混淆json请求的发送值。 Ex. 例如

Instead of: { "country": "USA" } To be: {"country":"******"} 代替:{“ country”:“ USA”}成为:{“ country”:“ ******”}

Thanks! 谢谢!

inorder to apply masking on filter . 为了在过滤器上使用遮罩。 you need to perform something like this.. http://vozis.blogspot.com/2012/02/log4j-filter-to-mask-payment-card.html 您需要执行类似的操作。.http://vozis.blogspot.com/2012/02/log4j-filter-to-mask-payment-card.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM