简体   繁体   English

PHP-AWS CloudWatch Logs返回tooNewLogEventsStartIndex

[英]PHP - AWS CloudWatch Logs return tooNewLogEventsStartIndex

I'm using AWS PHP SDK in order to allow clients application to send batch of Log Events to my central log @ AWS CloudWatch Logs. 我使用AWS PHP SDK是为了允许客户端应用程序将批日志事件发送到我的中央日志@ AWS CloudWatch Logs。

Using the PutLogEvents() method i'm pushing a batch of logs to AWS and receive the following response with tooNewLogEventStartIndex as rejected reason. 使用PutLogEvents()方法,我将一批日志推送到AWS并收到以下响应, tooNewLogEventStartIndex作为拒绝的原因。

object(Guzzle\Service\Resource\Model)#192 (2) {
  ["structure":protected]=>
  NULL
  ["data":protected]=>
  array(2) {
    ["nextSequenceToken"]=>
    string(56) "49557048644494214342955772042233869869420536807120962306"
    ["rejectedLogEventsInfo"]=>
    array(1) {
      ["tooNewLogEventStartIndex"]=>
      int(0)
    }
  }
}

I couldn't find any documentation @ AWS explaining what this error means.. Does someone knows? 我在@AWS上找不到任何文档来解释此错误的含义。有人知道吗?

Apparently this error means that the timestamp on the log event is to far in the future. 显然,此错误意味着日志事件的时间戳是很远的将来。 I did a mistake in my code and multiply my timestamp in 1000 (to microseconds) which was too much and made the timestamp in valid. 我在代码中犯了一个错误,将时间戳乘以1000(以微秒为单位),这太多了,并使时间戳有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM