itsgoingd / clockwork

Clockwork - php dev tools in your browser - server-side component
https://underground.works/clockwork
MIT License
5.69k stars 321 forks source link

fix(#676): allow monolog datasource to set the correct handler #682

Closed DominicDetta closed 9 months ago

DominicDetta commented 9 months ago

This PR solve the ticket #676 by setting the correct handler in the existing Clockwork\DataSource\MonologDataSource by checking whether the AbstractProcessingHandler:write has a return type.

itsgoingd commented 9 months ago

Hey, this can actually be done much simpler by checking the Logger::API constant - https://github.com/Seldaek/monolog/blob/main/src/Monolog/Logger.php#L103-L109.

DominicDetta commented 9 months ago

I modified the logic as you suggested @itsgoingd

itsgoingd commented 9 months ago

Thanks.