mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
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:
parent
99d9aeec98
commit
e64edbdc36
4
debug.go
4
debug.go
@ -12,6 +12,10 @@ import (
|
|||||||
var mstats = &runtime.MemStats{}
|
var mstats = &runtime.MemStats{}
|
||||||
|
|
||||||
func logEvent(e ui.Event) {
|
func logEvent(e ui.Event) {
|
||||||
|
// skip timer events e.g. /timer/1s
|
||||||
|
if e.From == "timer" {
|
||||||
|
return
|
||||||
|
}
|
||||||
var s string
|
var s string
|
||||||
s += fmt.Sprintf("Type=%s", quote(e.Type))
|
s += fmt.Sprintf("Type=%s", quote(e.Type))
|
||||||
s += fmt.Sprintf(" Path=%s", quote(e.Path))
|
s += fmt.Sprintf(" Path=%s", quote(e.Path))
|
||||||
|
Loading…
Reference in New Issue
Block a user