Skip to content

Commit

Permalink
Increase DB driver log level
Browse files Browse the repository at this point in the history
  • Loading branch information
mchompalova committed Dec 21, 2021
1 parent 419d114 commit 41a4459
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,24 @@ func main() {
})
dbDriverLogLevel := app.String(cli.StringOpt{
Name: "db-driver-log-level",
Value: "WARN",
Value: "ERROR",
Desc: "Db's driver log level (DEBUG, INFO, WARN, ERROR)",
EnvVar: "DB_DRIVER_LOG_LEVEL",
})

log := logger.NewUPPLogger(serviceName, *logLevel)
app.Action = func() {
log := logger.NewUPPLogger(serviceName, *logLevel)
dbDriverLog := logger.NewUPPLogger(serviceName+"-cm-neo4j-driver", *dbDriverLogLevel)

log.WithField("args", os.Args).Info("Application started")
log.Infof("relations-api will listen on port: %s, connecting to: %s", *port, *neoURL)

runServer(*neoURL, *port, *cacheDuration, *apiYml, log, dbDriverLog)
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.WithError(err).Fatal("Failed to start application")
}
}

func runServer(neoURL, port, cacheDuration, apiYml string, log, dbDriverLog *logger.UPPLogger) {
Expand Down

0 comments on commit 41a4459

Please sign in to comment.