MongoDB log files, huummm, they contains yummy informations, they could be also very interesting for troubleshooting…

I recently encounter a situation where there were sensible informations in the log files and the ops team didn’t want to share them with me (but I still had to help them 🙂 )

There are a few redact tools available in the waste internet, but they were not suiting this use case perfectly: Three monkeys, Fruit salad, Redaction

As so, I decided to write my own tool, the goals were:

  • Write a standalone application without dependancies;
  • Ensure that the output of the scripts contains no sensible information at all;
  • Having an output compatible with mtools (because I <3 mtools)

If you want to have a look, the script is available in Github: https://github.com/Dabz/mlogredact