You need to enable JavaScript to run this app.
日志服务

日志服务

复制全文
附录
数据编码方式
复制全文
数据编码方式

日志服务在日志上传 API 中(PutLogs)使用 Protocol Buffer 格式作为标准的日志写入格式。
Protocol Buffer 格式用于结构化交换格式。通过 API 接口写入日志到服务端之前,需要先把原始日志数据序列化成以下格式的 Protocol Buffer 数据流。

说明

调用 PutLogs 接口时,日志通过 LogGroupList 进行上传写入。

syntax = "proto3";
package pb;
option go_package = "./;pb";
message LogContent
{
  string Key = 1;
  string Value = 2;
}

message Log
{
  int64 Time = 1;// UNIX Time Format
  repeated LogContent Contents = 2;
}

message LogTag
{
  string Key = 1;
  string Value = 2;
}

message LogGroup
{    
  repeated Log Logs = 1;
  string Source = 2;
  repeated LogTag LogTags = 3;
  string FileName = 4;
  string ContextFlow = 5; //该字段暂无效用
}

message LogGroupList
{
  repeated LogGroup LogGroups = 1;
}
最近更新时间:2023.11.13 16:31:29
这个页面对您有帮助吗?
有用
有用
无用
无用