diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2020-03-04 17:31:02 +0000 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2020-03-04 17:31:02 +0000 |
| commit | 9314744d715b839b1708ca64fb6ca71438d8b440 (patch) | |
| tree | bca57acc5ed88d1202298f0e9ec684c7f74285fd /cmd/dgrep | |
| parent | 238dd3930e9c58397a86f649c77912ee32e4d7f0 (diff) | |
fix silent logging https://github.com/mimecast/dtail/issues/5
Diffstat (limited to 'cmd/dgrep')
| -rw-r--r-- | cmd/dgrep/main.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go index 9393cf6..6ba90fc 100644 --- a/cmd/dgrep/main.go +++ b/cmd/dgrep/main.go @@ -24,7 +24,7 @@ func main() { var noColor bool var regex string var serversStr string - var silentEnable bool + var quietEnable bool var sshPort int var trustAllHosts bool @@ -33,7 +33,7 @@ func main() { flag.BoolVar(&debugEnable, "debug", false, "Activate debug messages") flag.BoolVar(&displayVersion, "version", false, "Display version") flag.BoolVar(&noColor, "noColor", false, "Disable ANSII terminal colors") - flag.BoolVar(&silentEnable, "silent", false, "Reduce output") + flag.BoolVar(&quietEnable, "quiet", false, "Reduce output") flag.BoolVar(&trustAllHosts, "trustAllHosts", false, "Auto trust all unknown host keys") flag.IntVar(&connectionsPerCPU, "cpc", 10, "How many connections established per CPU core concurrently") flag.IntVar(&sshPort, "port", 2222, "SSH server port") @@ -53,9 +53,8 @@ func main() { version.PrintAndExit() } - ctx := context.Background() - serverEnable := false - logger.Start(ctx, serverEnable, debugEnable, silentEnable, silentEnable) + ctx := context.TODO() + logger.Start(ctx, logger.Modes{Debug: debugEnable, Quiet: quietEnable}) args := clients.Args{ ConnectionsPerCPU: connectionsPerCPU, |
