We have a need to intercept the entries that nlog is writing to disk so that any URLs/IP addresses and similar security-sensitive information can be obfuscated or somehow encoded.
For example, if any URL that is logged it should be converted from http://servername:2212/webservice to (http)://servername/2212/webservice
Is there any nlog pattern that would take a regex and convert to another string?
or is it possible to intercept the writing of the log file to achieve this?
Any help, suggestion or redirection would be really helpful.
We are using .NET 4.5, nlog 4.4, C#