Monolog processor to put UID in log messages #19175
Closed
1 task done
Labels
CMS Team
CMS Product team that manages both editor exp and devops
User Story or Problem Statement
In #19156, we removed Monolog's
current_user
processor, which was writing bothuid
andusername
information to log messages.username
is PII, butuid
is not. It is useful to be able to tie a log message back to the user whose actions resulted in the log message, so we should re-enableuid
.Description or Additional Context
The 'current_user' processor Monolog provides is here: https://git.drupalcode.org/project/monolog/-/blob/3.0.x/src/Logger/Processor/CurrentUserProcessor.php?ref_type=heads
This can almost certainly be used as a starting part for what we want. We specifically do not want to write email, username, or any other personally identifying information to the log; only user ID should be written.
The processor can be activated by adding it to a custom module's services. Example here:
https://github.com/department-of-veterans-affairs/va.gov-cms/blob/main/docroot/modules/custom/va_gov_backend/va_gov_backend.services.yml#L47
Steps for Implementation
Acceptance Criteria
The text was updated successfully, but these errors were encountered: