2020-04-02T15:40:05.440500764+08:00 stdout F {"key1":"val1","key2":"val2"}
2020-04-02T15:40:07.442412564+08:00 stdout F {"key1":"val1","key2":"val2"}
2020-04-02T15:40:09.442774495+08:00 stdout F {"key1":"val1","key2":"val2"}
2020-04-02T15:40:11.443799303+08:00 stdout F {"key1":"val1","key2":"val2"}
2020-04-02T15:40:13.445099622+08:00 stdout F {"key1":"val1","key2":"val2"}
2020-04-02T15:40:15.445934358+08:00 stdout F {"key1":"val1","key2":"val2"}
2020-04-02T15:40:17.447064707+08:00 stdout F {"key1":"val1","key2":"val2"}
2020-04-02T15:40:19.448112987+08:00 stdout F {"key1":"val1","key2":"val2"}
2020-04-02T15:40:21.449393263+08:00 stdout F {"key1":"val1","key2":"val2"}
This topic describes how to use a Log Service processor to parse user logs in the JSON format.
User logs of ECI are collected to a Logstore under your account. Log on to the Log Service console. Find the target Logstore and modify its configurations. On the Logtail Config page, set the Mode parameter to Simple Mode and turn on the Enable Plug-in Processing switch, as shown in the following figure.

{
"processors": [
{
"type": "processor_anchor",
"detail": {
"SourceKey": "content",
"Anchors": [
{
"Start": "stdout F ",
"Stop": "",
"FieldName": "json_content",
"FieldType": "string",
"ExpondJson": false
}
]
}
},
{
"type": "processor_json",
"detail": {
"SourceKey": "json_content",
"KeepSource": false,
"ExpandConnector": ""
}
}
]
}
Save the configurations. A few seconds later, you can view the logs parsed in the correct format, as shown in the following figure.

In this way, Log Service correctly parses user logs in the JSON format.