Mask sensitive data in logs

Dhaval Kolapkar
2 min readMay 10, 2018

With the large amounts of data being logged, it is important to mask sensitive details such as emails and credit card info while logging. Let us take an example of masking email logs. At my company, previous engineers used to hash the email and then log it! Can you imagine the compute power it took to hash each email every-time? Not to forget the human error, where a developer forgets to hash the email before logging it.

Let’s bring in some aspect oriented approach. We create a custom code, with which each time a message is logged, it automatically checks for sensitive data and…

--

--