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

InvalidArgumentException: Processors must be valid callables (callback or object with an __invoke method), BGalati\MonologSentryHandler\SentryHandler given #5

Closed
christheyounger opened this issue Sep 24, 2019 · 2 comments

Comments

@christheyounger
Copy link

HI there
I'm attempting to implement your solution as I share your feelings about the change to the implementation of the fingers crossed handler.
Here's what I've got:

$ravenHandler = new SentryHandler(new Hub($c->get('sentry')));
$logger->pushProcessor($ravenHandler);

Sentry is defined like this

return ClientBuilder::create(
                    $c->get('settings')['sentry'],
                )->getClient();

Still I'm getting this error

InvalidArgumentException: Processors must be valid callables (callback or object with an __invoke method), BGalati\MonologSentryHandler\SentryHandler given

slim php 3.9
monolog v1.25.1

Are you able to shed any light on this?

https://github.com/brighte-capital/slim-core/pull/5

Thanks

@christheyounger
Copy link
Author

I am a fool. I was using pushProcessor in place of pushHandler. Thank you sir.

@B-Galati
Copy link
Owner

Hello and thanks for this issue!

Beware of getsentry/sentry-php#878 (I will try to update the doc)
And also beware that the library might be broken for the new released version of the SDK: ^2.2 because of the hack needed for getsentry/sentry-php#811.

Cheers and let me know for anything!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants