Seldaek / monolog

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

Can I add a Processor to just one Monolog handler? #1349

Closed pnoeric closed 5 years ago

pnoeric commented 5 years ago

Can I add a Processor to just one Monolog handler? Or is there some other way I can alter a message that is only going out to one particular handler?

The handler I am working with (stackify-log-monolog) doesn't let me filter messages by level, so I want to drop all messages that are DEBUG. I also want to add a text string to the end of $record['message']. I can do this now, but it affects all my handlers, which is no good for my situation.

I thought maybe bubbling would help with this (i.e. if a message is DEBUG, let my first handlers do it, then don't let it bubble any further to get to the stackify handler) but I can't quite figure out how.

Thanks.

pnoeric commented 5 years ago

Nevermind, posting on Stack Overflow since I realized this isn't the place ;-) SORRY!

pnoeric commented 5 years ago

https://stackoverflow.com/questions/57092235/can-i-add-a-processor-to-just-one-monolog-handler