Skip to content

Commit

Permalink
dashboard/app: don't print resource for log records
Browse files Browse the repository at this point in the history
The resource is not informative in this case.
  • Loading branch information
dvyukov committed Aug 10, 2017
1 parent 4bd2619 commit 89e74d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dashboard/app/main.go
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 89e74d8

Please sign in to comment.