Closed (fixed)
Project:
AWS Cloudwatch Logs
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
11 Nov 2025 at 14:22 UTC
Updated:
26 Nov 2025 at 07:39 UTC
Jump to comment: Most recent
In case the log item is longer than what cloudwatch accepts, the module is truncating it to the maximum allowed size. That code produces an error:
> [error] TypeError: json_encode(): Argument #2 ($flags) must be of type int, array given in json_encode() (line 200 of /var/www/web/modules/contrib/aws_cloudwatchlogs/src/Servi
ces/PutLogEvents.php) #0 /var/www/web/modules/contrib/aws_cloudwatchlogs/src/Services/PutLogEvents.php(200): json_encode(Array, Array, 128)
> #1 /var/www/web/modules/contrib/aws_cloudwatchlogs/src/Logger/Log.php(179): Drupal\aws_cloudwatchlogs\Services\PutLogEvents->putLog(Object(Aws\CloudWatchLogs\CloudWatchLogsClien
t), '[WARNING] [sdc_...', '/app/infoportal...', '/drupal') Remove the non-existent second parameter from the json_encode call
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
petar_basic commentedComment #4
aludescher commentedComment #6
aludescher commented