Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Raven_Breadcrumbs_MonologHandler #165

Closed
ruudk opened this issue Oct 31, 2018 · 5 comments
Closed

Support Raven_Breadcrumbs_MonologHandler #165

ruudk opened this issue Oct 31, 2018 · 5 comments

Comments

@ruudk
Copy link
Contributor

ruudk commented Oct 31, 2018

It would be great if the Symfony bundle would automatically (when enabled in config) register this handler to Monolog.

That way, we can use Sentry Breadcrumbs as the logger. It will send it to the log file as to Sentry.

@Jean85
Copy link
Collaborator

Jean85 commented Oct 31, 2018

How would you suggest to register that logger? It should attach to your current Monolog config, and I'm not sure if this is viable in an automatic fashion...

@ruudk
Copy link
Contributor Author

ruudk commented Oct 31, 2018

Maybe this could work:

sentry:
  logger_service: logger

It defaults to logger. You can override it to connect to something else.

Then in the Extension, we create the Raven_Breadcrumbs_MonologHandler and push it to sentry.logger_service

@Jean85
Copy link
Collaborator

Jean85 commented Nov 5, 2018

What do you mean by "push it to sentry.logger_service"? And how would you link all of this to your full Monolog configuration?

@ruudk
Copy link
Contributor Author

ruudk commented Nov 5, 2018

I looked into it, and it seems that it's very simple to just configure this outside this bundle:

services:
    sentry.monolog_breadcrumbs_handler:
        class: 'Raven_Breadcrumbs_MonologHandler'
        arguments:
            - '@sentry.client'

monolog:
    handlers:
        sentry:
            type: service
            id: sentry.monolog_breadcrumbs_handler

Might be nice to add to the documentation.

@Jean85
Copy link
Collaborator

Jean85 commented Sep 27, 2019

We're moving some steps in this direction with #232 + #247

@ruudk ruudk closed this as completed Nov 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants