From 89e74d8ccb576df7760103936288d7f23f1bf62f Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 10 Aug 2017 19:28:37 +0200 Subject: [PATCH] dashboard/app: don't print resource for log records The resource is not informative in this case. --- dashboard/app/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dashboard/app/main.go b/dashboard/app/main.go index f61a780e2b9..766f686c038 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -256,7 +256,11 @@ func fetchErrorLogs(c context.Context) ([]byte, error) { continue } text := strings.Replace(al.Message, "\n", " ", -1) - entry := fmt.Sprintf("%v: %v (%v)\n", formatTime(al.Time), text, rec.Resource) + res := "" + if !strings.Contains(rec.Resource, "method=log_error") { + res = fmt.Sprintf(" (%v)", rec.Resource) + } + entry := fmt.Sprintf("%v: %v%v\n", formatTime(al.Time), text, res) lines = append(lines, entry) } }