aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaiTon2023-11-25 12:33:23 +0000
committerVaiTon2023-11-25 12:33:23 +0000
commitb903e12d6bb6b21d2af3326a6a5e8f40d2854138 (patch)
tree189876e3c5c01c2ee7c317a998c348f302b9a01e
parent7f0cab047c1f826473aebae0930861b654acfcde (diff)
Print debug log before connecting to MongoDB
-rw-r--r--caronte.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/caronte.go b/caronte.go
index 95f00ef..da65e9b 100644
--- a/caronte.go
+++ b/caronte.go
@@ -20,6 +20,7 @@ package main
import (
"flag"
"fmt"
+
log "github.com/sirupsen/logrus"
)
@@ -36,6 +37,7 @@ func main() {
flag.Parse()
logFields := log.Fields{"host": *mongoHost, "port": *mongoPort, "dbName": *dbName}
+ log.WithFields(logFields).Debug("connecting to MongoDB")
storage, err := NewMongoStorage(*mongoHost, *mongoPort, *dbName)
if err != nil {
log.WithError(err).WithFields(logFields).Fatal("failed to connect to MongoDB")