Protocol Buffer is a structured data interchange format developed by Google. It is widely used in many internal and external services of Google. Log Service uses Protocol Buffer as the standard format in writing logs. You need to serialize the original log data into Protocol Buffer data streams before writing [Logs] (
28961) into the server by using API.
required uint32 time = 1; // UNIX Time Format
required string key = 1;
required string value = 2;
repeated Content contents= 2;
repeated Log logs= 1;
optional string reserved =2; // Internal field, which does not need to be specified
optional string topic = 3;
optional string source = 4;
repeated LogGroup logGroupList = 1;
- Because PB does not require uniqueness of the Key-Value pair, you need to avoid such case. Otherwise, the behavior is undefined.
- For more details about Protocol Buffer, go to Github Home.
- For details about the APIs for log write function in Log Service, refer to [PostLogStoreLogs] (