diff options
author | VaiTon | 2023-11-25 12:33:23 +0000 |
---|---|---|
committer | VaiTon | 2023-11-25 12:33:23 +0000 |
commit | b903e12d6bb6b21d2af3326a6a5e8f40d2854138 (patch) | |
tree | 189876e3c5c01c2ee7c317a998c348f302b9a01e | |
parent | 7f0cab047c1f826473aebae0930861b654acfcde (diff) |
Print debug log before connecting to MongoDB
-rw-r--r-- | caronte.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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") |