From 1d36abd11ace412478f229712ae981415aa88e13 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Tue, 22 Sep 2020 17:43:19 +0300 Subject: [PATCH] - querylogs: GET /control/querylog: "service_name" field wasn't set Squashed commit of the following: commit a6571d483c8b5af6c051fb2fc08661d609a4e3d0 Author: Simon Zolin Date: Tue Sep 22 17:27:54 2020 +0300 - querylogs: GET /control/querylog: "service_name" field wasn't set --- AGHTechDoc.md | 1 + querylog/decode.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/AGHTechDoc.md b/AGHTechDoc.md index 0041f3e2..fb61e83f 100644 --- a/AGHTechDoc.md +++ b/AGHTechDoc.md @@ -1423,6 +1423,7 @@ When a new DNS request is received and processed, we store information about thi "Reason":3, "Rule":"...", "FilterID":1, + "ServiceName":"..." }, "Elapsed":12345, "Upstream":"...", diff --git a/querylog/decode.go b/querylog/decode.go index fc3f84eb..d0346daf 100644 --- a/querylog/decode.go +++ b/querylog/decode.go @@ -56,6 +56,8 @@ func decodeLogEntry(ent *logEntry, str string) { case "Reason": i, err = strconv.Atoi(v) ent.Result.Reason = dnsfilter.Reason(i) + case "ServiceName": + ent.Result.ServiceName = v case "Upstream": ent.Upstream = v