From 6c13395f7d501c13ebcd25d5c66dda4e4e06c2f3 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sat, 16 Jan 2021 09:41:27 +0000 Subject: [PATCH] add debug --- natsapi/api.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/natsapi/api.go b/natsapi/api.go index 0d67372d..e3bc6b05 100644 --- a/natsapi/api.go +++ b/natsapi/api.go @@ -47,8 +47,8 @@ func Listen(apihost, natshost string, debug bool) { } if debug { - fmt.Println("Api base url: ", api) - fmt.Println("Nats connection url: ", natsurl) + log.Println("Api base url: ", api) + log.Println("Nats connection url: ", natsurl) } rClient.SetHostURL(api) @@ -57,6 +57,9 @@ func Listen(apihost, natshost string, debug bool) { if err != nil { log.Fatalln(err) } + if natsinfo.IsError() { + log.Fatalln(natsinfo.String()) + } opts := []nats.Option{ nats.Name("TacticalRMM"),