Quite often when you have an issue, the first thing that is asked of you is for you to capture logs and send them off. The problem with this is that these logs quite often contain sensitive information, they contain things like user names and server ip's. Depending on the nature of your system and your organization, it might not be not only a bad idea to provide that information but it might be against your companies InfoSec policy, or, maybe even illegal. To help combat this issue I wrote this very simple java program with a sample batch file.
At the heart the program is the simple ability to do pre-defined 'find/replace' scenarios. The properties file contains two pre-defined find/replace scenarios.
1 - UserName - This will find the user: section of your log file and replace it with a generic 'UserName'
2 - IPv4 Address - This one will look for something like 192.168.0.125, but in a generic way so that it finds ANY ip address and replaces it with IPV4Address
The program is RegEx aware, which means that you can use complex find criteria that's not literal...read up on RegEx here if interested in the finer details (Regular expression - Wikipedia )
If you are on Windows all you need to do is configure your properties file to find/replace whatever it is you want to find and replace it with, then drag/drop your log file onto the batch file. The batch file will run the log through the program and spit out a copy of the log with the suffix .scrubbed.log appended on.
This utility does not make any network calls, it only reads the log file you provide it and gives you a scrubbed output.
This is an unofficial and unsupported tool, and comes with no warranties expressed or implied. It is still your responsibility to ensure that sensitive information is removed from the scrubbed file before posting that log anywhere, but this should help you get things cleaned up with ease and speed.