You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I was getting errors stating the following when running symfony:
[InvalidArgumentException]
Monolog configuration error: The logging channel "guzzle" assigned to the "guzzle" handler does not exist.
Researching this, I found that monolog.xml with the channel setup was being added via a CompilerPass. The monolog bundle also uses a compilerPass to find all services tagged with monolog.logger to create the necessary channels.
The problem I was having was the Monolog bundle's compiler pass was running first and thus the service misd_guzzle.log.adapter.monolog service hadn't been added to the container yet and was thus not fund and the guzzle channel not created.
To fix this issue, I've updated my AppKernel from:
This results in the guzzle bundle's compiler pass running first and injecting misd_guzzle.log.adapter.monolog into the container. The monolog bundle's compiler pass then correctly finds it and creates the guzzle channel.
Is there a better way to fix this? If not, should a note be added in the setup process mentioning the issue and solution?
Thanks for the hard work on this bundle!
The text was updated successfully, but these errors were encountered:
Sorry for not looking at this sooner. If you're still seeing this does moving the misd_guzzle.log.adapter.monolog service to the services.xml file resolve it? If it does, we could change the MonologCompilerPass so that it just adds the misd_guzzle.plugin tag to the misd_guzzle.log.monolog service (as opposed to loading a new configuration file). If Monolog isn't enabled then the services won't be created (I'm assuming there wouldn't be a problem, clearly needs checking!).
Hello.
Looks like logs from guzzle putting to app.DEBUG channel. Could you please tell the way to put guzzle logs to guzzle.DEBUG channel and put logs to separate log file. I did all above steps, but no new file was created and logs still in app.DEBUG section.
I attempted to setup guzzle log messages to go to another file by adding the following to my monolog config.
This appears like it should work and that this bundle should create the channel as seen in the bundle's monolog.xml file.
However, I was getting errors stating the following when running symfony:
Researching this, I found that monolog.xml with the channel setup was being added via a CompilerPass. The monolog bundle also uses a compilerPass to find all services tagged with monolog.logger to create the necessary channels.
The problem I was having was the Monolog bundle's compiler pass was running first and thus the service misd_guzzle.log.adapter.monolog service hadn't been added to the container yet and was thus not fund and the guzzle channel not created.
To fix this issue, I've updated my AppKernel from:
to:
This results in the guzzle bundle's compiler pass running first and injecting misd_guzzle.log.adapter.monolog into the container. The monolog bundle's compiler pass then correctly finds it and creates the guzzle channel.
Is there a better way to fix this? If not, should a note be added in the setup process mentioning the issue and solution?
Thanks for the hard work on this bundle!
The text was updated successfully, but these errors were encountered: