使用拆分日志处理较长的日志条目
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Cloud Logging 将传入日志的大小限制为 256 KB,并会舍弃任何更大的日志。为确保 Cloud Logging 保留大型日志,Fleet Engine 可以将这些日志拆分为一系列较小的日志。
Cloud Logging 可能会拆分来自 Fleet Engine 的以下日志:
每个拆分日志条目都包含以下字段:
split.uid
:从共同原始日志条目拆分出来的一组日志条目的唯一标识符。对于从原始日志条目拆分出来的所有条目,此字段的值都相同。
split.index
:相应条目在拆分条目序列中的位置。
拆分中的第一个条目的索引为 0.split.index
。此索引也会附加到 LogEntry.insertId
字段。
split.totalSplits
:原始日志条目拆分成的日志条目数。对于从原始日志条目拆分出的所有条目,此字段的值都相同。
split log 1:
insertId: "XXXX-01"
split {index: 0, uuid: "XXXX"}
splitLog 2:
insertId: "XXX-02"
split {index: 1, uuid: "XXXX"}
如需查找从一条特定日志拆分出来的所有日志,请使用如下查询:
split.uid="789+2022-02-22T12:22:22.22+05:00"
sortby split.index OR sortby insertID
这些拆分日志的结构与 Cloud Audit Logs 指南中显示的结构几乎相同。主要区别在于,对于 Fleet Engine 日志,拆分发生在 jsonPayload
字段中。如需了解详情和示例,请参阅拆分审核日志条目。
后续步骤
如需根据您的条件对日志进行计数和过滤,请创建基于日志的指标。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eCloud Logging limits log size to 256KB, and Fleet Engine can split larger logs into smaller segments for retention.\u003c/p\u003e\n"],["\u003cp\u003eSplit logs contain unique identifiers (\u003ccode\u003esplit.uid\u003c/code\u003e), index (\u003ccode\u003esplit.index\u003c/code\u003e), and total split count (\u003ccode\u003esplit.totalSplits\u003c/code\u003e) for reassembly.\u003c/p\u003e\n"],["\u003cp\u003eYou can search for related split logs using the \u003ccode\u003esplit.uid\u003c/code\u003e and sort by \u003ccode\u003esplit.index\u003c/code\u003e or \u003ccode\u003einsertId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFleet Engine's split log structure is similar to Cloud Audit Logs, with splitting occurring in the \u003ccode\u003ejsonPayload\u003c/code\u003e field.\u003c/p\u003e\n"]]],[],null,["Cloud Logging limits the size on incoming logs to 256KB and drops\nanything bigger. To ensure that Cloud Logging retains your large\nlogs, Fleet Engine can split them into a series of smaller logs.\n\nCloud logging may split the following logs from Fleet Engine:\n\n- [SearchVehiclesLog](/maps/documentation/mobility/operations/cloud-logging/reference/trips/rest/Shared.Types/SearchVehiclesLog)\n- [ListDeliveryVehicle](/maps/documentation/mobility/operations/cloud-logging/reference/tasks/rest/Shared.Types/ListDeliveryVehiclesLog)\n- [ListTasksLog](/maps/documentation/mobility/operations/cloud-logging/reference/tasks/rest/Shared.Types/ListTasksLog)\n- [BatchCreateTasksLog](/maps/documentation/mobility/operations/cloud-logging/reference/tasks/rest/Shared.Types/BatchCreateTasksLog)\n\nEach split log entry contains the following fields:\n\n- `split.uid`: A unique identifier for the group of log entries that were split from a common original log entry. The value of this field is the same for all entries split from the original log entry.\n- `split.index`: The position of this entry in the series of split entries. The first entry from the split has index `0.split.index`. This index is also appended to the `LogEntry.insertId` field.\n- `split.totalSplits`: The number of log entries that the original log entry was split into. The value of this field is the same for all entries split from the original log entry.\n\n split log 1:\n insertId: \"XXXX-01\"\n split {index: 0, uuid: \"XXXX\"}\n\n splitLog 2:\n insertId: \"XXX-02\"\n split {index: 1, uuid: \"XXXX\"}\n\nTo find all the logs that were split from one specific log, use a query like: \n\n split.uid=\"789+2022-02-22T12:22:22.22+05:00\"\n sortby split.index OR sortby insertID\n\nThe structure of these split logs is almost the same as the structure shown in\nthe guide for Cloud Audit Logs. The major difference is that for Fleet Engine\nlogs, the split occurs in the `jsonPayload` field. For details and examples, see\n[Split audit log entries](https://cloud.google.com/logging/docs/audit/split-logs).\n\nWhat's next\n\nTo count and filter logs according to you criteria, [create log-based\nmetrics](/maps/documentation/mobility/operations/cloud-logging/metrics)."]]