csarrazi / CsaGuzzleBundle

A bundle integrating Guzzle >=4.0 in Symfony
250 stars 76 forks source link

Configure service for log middleware per client #246

Open ugurerkan opened 5 years ago

ugurerkan commented 5 years ago

Hello,

I want to configure bundle for log per client, with this I will able to store log data per file related with client. I found https://gist.github.com/csarrazi/bb6ac210827973033cbd this good example for separate guzzle logs from main mono log stream but can't figure out how to apply this per client?

In short, I guess I need define logger service for client.

Any help? Thanks!

csarrazi commented 5 years ago

Hi @ugurerkan. Currently, the bundle implementation does not allow you to inject a different logger per client, and uses a single logger for all clients. If you'd like to implement this, feel free to implement a pull request here.

ugurerkan commented 5 years ago

Hi @csarrazi I'll happy to look into it 👍

andreicio commented 5 years ago

The EightPointsGuzzleBundle has this feature, but it doesn't allow for sorting of plugins and does not use a compiler pass to collect all plugins.