How to remove secrets from log with monolog | Parthenon The Symfony SaaS Boilerplate
Logging is a very important part of operating an application if you're unaware of what happened in your system you're unable to quickly and efficiently identify the issue. However, logging can open up some potential pitfalls.
A good example of using a log processor to filter out items from log processing (using PHP’s Monolog). One possible improvement, depending on the use case, would be to check the values against patterns that shouldn’t be logged, like GitHub tokens.