-
Notifications
You must be signed in to change notification settings - Fork 84
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
Incompatibility with Monolog 3 #108
Comments
Hi @guillaumesmo. |
@maxbanton, branch feature/php-8.1 seems to work fine with Monolog 3, except one small issue (might be on my side only): workaround is to set the
However, I created this issue not because Monolog 3 is not yet supported, but because it has been (mistakenly?) added in the composer of maxbanton/cwh v2.0.3, so that version is actually broken if you don't hardcode Monolog v2 in your composer.json |
#108 (comment) wow, yeah that seems to have been caused by me through #106 😨 , sorry guys! |
would be great to see this resolved if possible, i see theres an open pr for php8.1 + monolog v3, |
@maxbanton thanks for the package! Any plans to release the feature/php-8.1 in the near future? |
@maxbanton any Monolog 3 updates? This is blocking my migration to Laravel 10. |
an alternative to using this monolog handler is to setup the aws cloudwatch agent on your deployments that records the standard laravel.log output |
@mad-briller thanks, but that's not a good option for me. I'm running Dockerised Laravel in ECS - it's designed around having one process running so running a Cloudwatch agent alongside the web server under some kind of supervisor process adds complexity and is a bit of an antipattern. |
I switched to the fork phpnexus/cwh. Worked a treat! |
Describe the bug
Support for Monolog v3 has been added in the composer file in v2.0.3: #106
However it seems like the methods are not compatible with the Monolog v3 interfaces:
Fatal error: Declaration of Maxbanton\Cwh\Handler\CloudWatch::write(array $record): void must be compatible with Monolog\Handler\AbstractProcessingHandler::write(Monolog\LogRecord $record): void in .../vendor/maxbanton/cwh/src/Handler/CloudWatch.php on line 164
Please tell about your environment:
The text was updated successfully, but these errors were encountered: