Commit c8b007e2 authored by Akshay Mahendrakar's avatar Akshay Mahendrakar
Browse files

coreimmudb - Connection failure logger message added.

No related merge requests found
Showing with 2 additions and 0 deletions
......@@ -10,6 +10,7 @@ import (
"time"
"corelab.mkcl.org/MKCLOS/coredevelopmentplatform/corepkgv2/errormdl"
"corelab.mkcl.org/MKCLOS/coredevelopmentplatform/corepkgv2/loggermdl"
"github.com/codenotary/immudb/pkg/api/schema"
"github.com/codenotary/immudb/pkg/auth"
immudb "github.com/codenotary/immudb/pkg/client"
......@@ -152,6 +153,7 @@ func AddDBConnection(host ImmuHost) error {
client = immudb.NewClient().WithOptions(opts)
err := client.OpenSession(context.TODO(), []byte(host.Username), []byte(host.Password), host.Database)
if err != nil {
loggermdl.LogError("FAILED TO CONNECT TO IMMUDB HOST '" + host.HostName + "' - " + err.Error())
return err
}
instances[host.HostName] = client
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment