From 7db0182e0a3c7401a4e49b0ae917070e81994046 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 29 Dec 2020 17:17:12 +0000 Subject: Quiet mode also affects client side logging --- cmd/dcat/main.go | 5 ++++- cmd/dgrep/main.go | 5 ++++- cmd/dmap/main.go | 5 ++++- cmd/dtail/main.go | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) (limited to 'cmd') diff --git a/cmd/dcat/main.go b/cmd/dcat/main.go index c59a242..238f97a 100644 --- a/cmd/dcat/main.go +++ b/cmd/dcat/main.go @@ -49,7 +49,10 @@ func main() { } ctx := context.TODO() - logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable}) + logger.Start(ctx, logger.Modes{ + Debug: debugEnable || config.Common.DebugEnable, + Quiet: args.Quiet, + }) client, err := clients.NewCatClient(args) if err != nil { diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go index 276dff4..4da1bb3 100644 --- a/cmd/dgrep/main.go +++ b/cmd/dgrep/main.go @@ -53,7 +53,10 @@ func main() { } ctx := context.TODO() - logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable}) + logger.Start(ctx, logger.Modes{ + Debug: debugEnable || config.Common.DebugEnable, + Quiet: args.Quiet, + }) if grep != "" { args.RegexStr = grep diff --git a/cmd/dmap/main.go b/cmd/dmap/main.go index a954e45..1a05549 100644 --- a/cmd/dmap/main.go +++ b/cmd/dmap/main.go @@ -56,7 +56,10 @@ func main() { } ctx := context.TODO() - logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable}) + logger.Start(ctx, logger.Modes{ + Debug: debugEnable || config.Common.DebugEnable, + Quiet: args.Quiet, + }) client, err := clients.NewMaprClient(args, queryStr, clients.DefaultMode) if err != nil { diff --git a/cmd/dtail/main.go b/cmd/dtail/main.go index e41d675..f2a039f 100644 --- a/cmd/dtail/main.go +++ b/cmd/dtail/main.go @@ -84,7 +84,10 @@ func main() { os.Exit(healthClient.Start(ctx)) } - logger.Start(ctx, logger.Modes{Debug: debugEnable || config.Common.DebugEnable}) + logger.Start(ctx, logger.Modes{ + Debug: debugEnable || config.Common.DebugEnable, + Quiet: args.Quiet, + }) if pprof > -1 { // For debugging purposes only -- cgit v1.2.3