add debug

This commit is contained in:
wh1te909 2021-01-16 09:41:27 +00:00
parent 77b32ba360
commit 6c13395f7d
1 changed files with 5 additions and 2 deletions

View File

@ -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"),