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

Add a WithMonologChannel attribute #1847

Closed stof closed 1 year ago

stof commented 1 year ago

This attribute is meant to be used by frameworks / integrations to choose which logger instance to inject in a class when they manage several channels, if they decide to use it. This attribute will have no effect in Monolog itself as the wiring of the logger in other classes is not managed by Monolog.

stof commented 1 year ago

the phpstan failure is unrelated to my change. It is fixed in #1848

Seldaek commented 1 year ago

Yeah I guess why not have this here as well

stof commented 1 year ago

@Seldaek do you know when the 3.5 release will be done with this attribute included ? I'm adding support for this attribute in monolog-bundle.

Seldaek commented 1 year ago

I'll try to do this soon but it might be a week or two.. Would like to go through all open stuff as it's been a while

Seldaek commented 1 year ago

Ok 3.5.0 is out now https://github.com/Seldaek/monolog/releases/tag/3.5.0