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
Symfony\Component\ErrorHandler\Error\FatalError: Declaration of Maxbanton\Cwh\Handler\CloudWatch::write(array $record): void must be compatible with Monolog\Handler\AbstractProcessingHandler::write(Monolog\LogRecord $record): void in file /maxbanton/cwh/src/Handler/CloudWatch.php on line 164
#46
Open
edenmydev opened this issue
Sep 27, 2023
· 1 comment
The option 'via' causes to get the error when i run a simple log Symfony\Component\ErrorHandler\Error\FatalError: Declaration of Maxbanton\Cwh\Handler\CloudWatch::write(array $record): void must be compatible with Monolog\Handler\AbstractProcessingHandler::write(Monolog\LogRecord $record): void in file /maxbanton/cwh/src/Handler/CloudWatch.php on line 164
I found that the monolog/monolog version need to be under 3.0.0 to make it works. But laravel/framework v10 requires monolog version to be upper than 3.0.
how can we solve this issue please?
The text was updated successfully, but these errors were encountered:
"laravel/framework": "v10.19.0"
"pagevamp/laravel-cloudwatch-logs":"v1.1.1",
"monolog/monolog": "3.4.0",
I added in logging.php
'cloudwatch' => [
'driver' => 'custom',
'name' => env('CLOUDWATCH_LOG_NAME', ''),
'region' => env('CLOUDWATCH_LOG_REGION', ''),
'credentials' => [
'key' => env('CLOUDWATCH_LOG_KEY', ''),
'secret' => env('CLOUDWATCH_LOG_SECRET', '')
],
'stream_name' => env('CLOUDWATCH_LOG_STREAM_NAME', 'laravel_app'),
'retention' => env('CLOUDWATCH_LOG_RETENTION_DAYS', 14),
'group_name' => env('CLOUDWATCH_LOG_GROUP_NAME', 'laravel_app'),
'version' => env('CLOUDWATCH_LOG_VERSION', 'latest'),
'formatter' => \Monolog\Formatter\JsonFormatter::class,
'batch_size' => env('CLOUDWATCH_LOG_BATCH_SIZE', 10000),
'via' => \Pagevamp\Logger::class,
],
The option 'via' causes to get the error when i run a simple log
Symfony\Component\ErrorHandler\Error\FatalError: Declaration of Maxbanton\Cwh\Handler\CloudWatch::write(array $record): void must be compatible with Monolog\Handler\AbstractProcessingHandler::write(Monolog\LogRecord $record): void in file /maxbanton/cwh/src/Handler/CloudWatch.php on line 164
I found that the monolog/monolog version need to be under 3.0.0 to make it works. But laravel/framework v10 requires monolog version to be upper than 3.0.
how can we solve this issue please?
The text was updated successfully, but these errors were encountered: