logging: skip timer events e.g. /timer/1s

Each second we receive the timer event which makes little sense but log is bloated with the event.
To make logs more readable we can disable logging of this event
This commit is contained in:
Sergey Ponomarev 2020-11-18 11:25:20 +02:00
parent 4c280cee56
commit 2c07cab59c
1 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,10 @@ import (
var mstats = &runtime.MemStats{}
func logEvent(e ui.Event) {
// skip timer events e.g. /timer/1s
if e.From == "timer" {
return
}
var s string
s += fmt.Sprintf("Type=%s", quote(e.Type))
s += fmt.Sprintf(" Path=%s", quote(e.Path))