Examples:
COAP:
{
"L": "DEBUG",
"T": "2022-02-22T15:26:42.524269462Z",
"M": "finished unary call from the device with code Changed",
"startTime": "2022-02-22T15:26:42.481380231Z",
"durationMs": 40.756,
"request": {
"body": {
"accesstoken": "0ca0c61204a543abd3ee0ea2d16e829c",
"authprovider": "plgd",
"di": "b5a2a42e-b285-42f1-a36b-034c8fc8efd5"
},
"href": "/oic/sec/account",
"method": "POST"
},
"response": {
"body": {
"accesstoken": "eyJhbGciOiJFUzI1NiIsImtpZCI6ImIwZWE1MGMxLTY3MGMtNWIwOC1iNjc3LWQzZTdlZmFlNWUwZiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsiaHR0cHM6Ly9sb2NhbGhvc3Q6MjAwMDkvIl0KLCJjbGllbnRfaWQiOiJ0ZXN0IiwiaHR0cHM6Ly9wbGdkLmRldi9kZXZpY2VJZCI6ImI1YTJhNDJlLWIyODUtNDJmMS1hMzZiLTAzNGM4ZmM4ZWZkNSIsImlhdCI6MTY0NTU0MzYwMgosImlzcyI6Imh0dHBzOi8vbG9jYWxob3N0OjIwMDA5LyIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MgcjoqIHc6KiIsInN1YiI6IjEifQ.y-eMN0RL7w4xxeVLHrc_8dugXfYOVMrKghky6EcueLTpgLMib8Src-e_Q_3d-QjSO6qRe2KrPmSdzjoRjy5ZYg",
"expiresin": -1,
"redirecturi": "",
"refreshtoken": "refresh-token",
"uid": "1"
},
"code": "Changed"
},
"protocol": "COAP"
}
GRPC:
{
"L": "WARN",
"T": "2022-02-21T20:29:11.522144612Z",
"M": "finished unary call with code PermissionDenied",
"response": {
"code": "PermissionDenied",
"error": "rpc error: code = PermissionDenied desc = cannot validate user access: rpc error: code = PermissionDenied desc = access denied"
},
"durationMs": 1.846,
"protocol": "GRPC",
"startTime": "2022-02-21T20:29:11.519007649Z",
"request": {
"correlationId": "8d08dd47-9b6e-4eb4-bbb9-3f1bcfa3f025",
"deviceId": "a",
"href": "/b",
"jwt": {
"sub": "1"
},
"method": "CreateResource",
"service": "resourceaggregate.pb.ResourceAggregate"
}
}
HTTP:
{
"L": "DEBUG",
"T": "2022-02-21T21:19:26.986032016Z",
"M": "finished unary call with status code 200",
"durationMs": 75.45,
"request": {
"href": "/api/v1/devices/6f1e8e14-e4fe-4282-672b-d6f89bd4a9f6/resource-links/switches",
"jwt": {
"sub": "1"
},
"method": "POST"
},
"response": {
"code": 200
},
"startTime": "2022-02-21T21:19:26.909713334Z",
"protocol": "HTTP"
}
Loki parser: https://grafana.com/docs/loki/latest/logql/log_queries/#json
https://github.com/plgd-dev/www/pull/48