From 1c7c0dbb5174b5255912183b9ec5870ccdef3426 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 10 Sep 2020 14:57:52 +0100 Subject: printing client stats every other second only if the connection count has changed or when SIGUSR1 or SIGINFO recieved --- cmd/dgrep/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd/dgrep') diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go index e58ea8f..d1fdc21 100644 --- a/cmd/dgrep/main.go +++ b/cmd/dgrep/main.go @@ -9,6 +9,7 @@ import ( "github.com/mimecast/dtail/internal/color" "github.com/mimecast/dtail/internal/config" "github.com/mimecast/dtail/internal/io/logger" + "github.com/mimecast/dtail/internal/io/signal" "github.com/mimecast/dtail/internal/user" "github.com/mimecast/dtail/internal/version" ) @@ -62,7 +63,7 @@ func main() { panic(err) } - status := client.Start(ctx) + status := client.Start(ctx, signal.StatsCh(ctx)) logger.Flush() os.Exit(status) } -- cgit v1.2.3