I am using ${aspnet-request-post-body} to log the request body in log file. The problem I am facing: I want to prevent ${aspnet-request-post-body} to log some info i.e password and credit card details and I like to apply masking on them.
For example if request body is
{username : ABC, password :554&3}
this should be logged in this format
{username: ABC, password : ****}
Please note I have already tried replace layout for this problem and don't want to use this. Is there any other way to do this task?