You've already forked monolog-handlers
fixes that
This commit is contained in:
@@ -88,7 +88,7 @@ class CloudWatch extends AbstractProcessingHandler
|
|||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
CloudWatchLogsClient $client,
|
CloudWatchLogsClient $client,
|
||||||
$group,
|
$group,
|
||||||
string $stream,
|
string $stream,
|
||||||
int $retention = 14,
|
int $retention = 14,
|
||||||
int $batchSize = 10000,
|
int $batchSize = 10000,
|
||||||
@@ -295,6 +295,17 @@ class CloudWatch extends AbstractProcessingHandler
|
|||||||
|
|
||||||
$this->checkThrottle();
|
$this->checkThrottle();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int $key
|
||||||
|
* @var LogRecord $logEvent
|
||||||
|
*/
|
||||||
|
foreach ($data['logEvents'] as $key => $logEvent) {
|
||||||
|
$data['logEvents'][$key] = [
|
||||||
|
'message' => $logEvent->message,
|
||||||
|
'timestamp' => $logEvent->datetime->getTimestamp()
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
$response = $this->client->putLogEvents($data);
|
$response = $this->client->putLogEvents($data);
|
||||||
|
|
||||||
$this->sequenceToken = $response->get('nextSequenceToken');
|
$this->sequenceToken = $response->get('nextSequenceToken');
|
||||||
|
|||||||
Reference in New Issue
Block a user