Seldaek / monolog

Sends your logs to files, sockets, inboxes, databases and various web services
https://seldaek.github.io/monolog/
MIT License
21.05k stars 1.9k forks source link

Adding postParams in ERROR notice for HTTP 405 code #1898

Closed sdespont closed 5 months ago

sdespont commented 5 months ago

Monolog version 3

Hello, I use HtmlFormatter to receive logs by email.

In the case of an ERROR notification for an HTTP 405 error code, there is no postParams data provided, but postParams are present in the next INFO notification if present for a deprecated notification.

How can I include postParams directly in the ERROR notification?

Seldaek commented 5 months ago

The best way to do email logging IMO is to combine it with a FingersCrossedHandler => BufferHandler => MailerHandler. That way you get the full request logs in the email, not just the ERROR.