From 2d7ddbeae8286373ac19787dc7dde598a7cb0598 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 8 Oct 2021 11:43:43 +0300 Subject: refactor --- 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 95db6f0..529331d 100644 --- a/cmd/dgrep/main.go +++ b/cmd/dgrep/main.go @@ -34,6 +34,7 @@ func main() { flag.StringVar(&args.ConfigFile, "cfg", "", "Config file path") flag.StringVar(&args.Discovery, "discovery", "", "Server discovery method") flag.StringVar(&args.LogDir, "logDir", "~/log", "Log dir") + flag.StringVar(&args.Logger, "logger", config.DefaultClientLogger, "Logger name") flag.StringVar(&args.LogLevel, "logLevel", "", "Log level") flag.StringVar(&args.PrivateKeyPathFile, "key", "", "Path to private key") flag.StringVar(&args.RegexStr, "regex", ".", "Regular expression") @@ -55,7 +56,7 @@ func main() { ctx, cancel := context.WithCancel(context.Background()) var wg sync.WaitGroup wg.Add(1) - dlog.Start(ctx, &wg, source.Client, args.LogLevel) + dlog.Start(ctx, &wg, source.Client) if grep != "" { args.RegexStr = grep -- cgit v1.2.3