Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How Remove PII (Personal Information) from MonoLog log files? #1780

Open
ballcorn opened this issue Dec 3, 2022 · 1 comment
Open

How Remove PII (Personal Information) from MonoLog log files? #1780

ballcorn opened this issue Dec 3, 2022 · 1 comment
Labels

Comments

@ballcorn
Copy link

ballcorn commented Dec 3, 2022

Monolog version 3?

I see some plugins and scripts to remove PII from monolog logs, but everything i have found is realted to Monolog 2. How can i remove information like CreditCard data from any logs?

Here's and example i found for Monolog 2.0

If I implement what is here with Monolog 3, I get the following error.

Fatal error: Declaration of RedactSensitive\RedactSensitiveProcessor::__invoke(array $record): array must be compatible with Monolog\Processor\ProcessorInterface::__invoke(Monolog\LogRecord $record) in /... .../RedactSensitiveProcessor.php on line 34

@Seldaek
Copy link
Owner

Seldaek commented Feb 4, 2023

Yes.. you need to port the code to work with Monolog 3, see https://github.com/Seldaek/monolog/blob/main/UPGRADE.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants