Hi Jim, for a meaningful audit trail I think the general system logs are only the second best option and you would rather want to ensure meaningful observability through something like a PSR-14 Event system - the different system components just emit events and have no notion of priority or relevance - that's for the event listeners to decide, i.e. your audit sink.
On Sun, Apr 19, 2026 at 7:34 PM Jim Auldridge <[email protected]> wrote: > Greetings, > > I am involved in a few projects which will need me to implement some solid > audit logging. I use loggers that implement the PSR-3 Logger Interface and > am surprised to find no mention of audit logging. I see further that it > references RFC 2119, which also makes no mention of audit logging. > > It seems to me that logging for the purpose of leaving an audit trail > is somewhat different than the other log level purposes. Audit entries > should probably always be logged, regardless of the log level configuration > in a project. Perhaps a log level of AUDIT that *always* logs if a new > companion boolean config flag is set to true? > > It also seems there should be some expected format that includes what user > took an action, whether it was done by proxy of another user, and what it > was that took place (the message). > > Do you have any thoughts these needs and whether the current PSR covers > them? Any other ideas for audit logging criteria? How would you implement > audit trails with the current logger interface, or is it appropriate to > suggest a new PSR for logging that includes this need? > > Thanks for any discussion you bring to the matter! > Jim > > -- > You received this message because you are subscribed to the Google Groups > "PHP Framework Interoperability Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/php-fig/c100ae27-6056-4913-b3f1-9495e1446ed0n%40googlegroups.com > <https://groups.google.com/d/msgid/php-fig/c100ae27-6056-4913-b3f1-9495e1446ed0n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/php-fig/CAB%2BY%2BEp6W1MFwZf007oMEp4j3qL2xCXHj5SNkWJJD35zu%3DEx3w%40mail.gmail.com.
