From c0332e8fa13f4939de17c856b2e71fd093847253 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 15 Oct 2021 09:04:40 +0300 Subject: add dcat color output test --- cmd/dtailhealth/main.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmd/dtailhealth/main.go') diff --git a/cmd/dtailhealth/main.go b/cmd/dtailhealth/main.go index 7e54b1c..ec97d3a 100644 --- a/cmd/dtailhealth/main.go +++ b/cmd/dtailhealth/main.go @@ -16,19 +16,26 @@ import ( "github.com/mimecast/dtail/internal/io/dlog" "github.com/mimecast/dtail/internal/io/signal" "github.com/mimecast/dtail/internal/source" + "github.com/mimecast/dtail/internal/version" ) // The evil begins here. func main() { var args config.Args + var displayVersion bool var pprof int + flag.BoolVar(&displayVersion, "version", false, "Display version") flag.IntVar(&pprof, "pprof", -1, "Start PProf server this port") flag.StringVar(&args.Logger, "logger", config.DefaultHealthCheckLogger, "Logger name") flag.StringVar(&args.LogLevel, "logLevel", "none", "Log level") flag.StringVar(&args.ServersStr, "server", "", "Remote server to connect") flag.Parse() + if displayVersion { + version.PrintAndExit() + } + config.Setup(source.HealthCheck, &args, flag.Args()) ctx, cancel := context.WithCancel(context.Background()) -- cgit v1.2.3