irv*_*one 9 php amazon-web-services zend-framework2 amazon-cloudwatch
嗨伙计们,我正试图将登录亚马逊CloudWatchLogs这样:
$response2 = $amzonLoger->putLogEvents([
'logGroupName' => 'myGroup',
'logStreamName' => 'myStream',
'logEvents' => [
[
'timestamp' => time(),
'message' => 'message'
],
],
'sequenceToken' => lastToken,
]);
var_dump($response2);
Run Code Online (Sandbox Code Playgroud)
但总是我有这样的回应:
bject(Guzzle\Service\Resource\Model)#289 (2) { ["structure":protected]=> NULL ["data":protected]=> array(2) { ["nextSequenceToken"]=> string(56) "495401145812734324234234236420825819917076850" ["rejectedLogEventsInfo"]=> array(1) { ["tooOldLogEventEndIndex"]=> int(1) } } }
Run Code Online (Sandbox Code Playgroud)
你可以帮我理解是什么意思["rejectedLogEventsInfo"] => array(1){["tooOldLogEventEndIndex"] => int(1),我将非常感谢你的帮助.
irv*_*one 15
好的家伙我发现解决方案添加此行而不是time()PHP 的功能.遵循此示例cloudWatchLogs.
'timestamp' => round(microtime(true) * 1000),
Run Code Online (Sandbox Code Playgroud)
我希望这可以帮助某人对未来表示感谢.
| 归档时间: |
|
| 查看次数: |
2991 次 |
| 最近记录: |