summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-10-09 16:44:28 +0300
committerPaul Buetow <paul@buetow.org>2021-10-10 13:36:32 +0300
commit7a7169791a64190e1002e38bc9c04ad0d5c1ce1f (patch)
tree2c1aa056285b3e5d4febefd114a4b95f62071386 /cmd
parent2d7ddbeae8286373ac19787dc7dde598a7cb0598 (diff)
add dtail health check unit test.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dserver/main.go2
-rw-r--r--cmd/dtailhealthcheck/main.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/cmd/dserver/main.go b/cmd/dserver/main.go
index 780c6d5..b4fc873 100644
--- a/cmd/dserver/main.go
+++ b/cmd/dserver/main.go
@@ -40,7 +40,7 @@ func main() {
flag.StringVar(&args.ConfigFile, "cfg", "", "Config file path")
flag.StringVar(&args.LogDir, "logDir", "", "Log dir")
flag.StringVar(&args.Logger, "logger", config.DefaultServerLogger, "Logger name")
- flag.StringVar(&args.LogLevel, "logLevel", "", "Log level")
+ flag.StringVar(&args.LogLevel, "logLevel", config.DefaultLogLevel, "Log level")
flag.Parse()
args.NoColor = !color
diff --git a/cmd/dtailhealthcheck/main.go b/cmd/dtailhealthcheck/main.go
index 71c162e..0f37f8a 100644
--- a/cmd/dtailhealthcheck/main.go
+++ b/cmd/dtailhealthcheck/main.go
@@ -36,6 +36,8 @@ func main() {
var wg sync.WaitGroup
wg.Add(1)
+ dlog.Start(ctx, &wg, source.HealthCheck)
+
if pprof > -1 {
// For debugging purposes only
pprofArgs := fmt.Sprintf("0.0.0.0:%d", pprof)
@@ -43,7 +45,6 @@ func main() {
dlog.Client.Info("Started PProf", pprofArgs)
}
- dlog.Start(ctx, &wg, source.HealthCheck)
healthClient, _ := clients.NewHealthClient(args)
os.Exit(healthClient.Start(ctx, signal.NoCh(ctx)))
}