From efc49e1a2cd95ac4a2c97095499ff4dcd687da6d Mon Sep 17 00:00:00 2001 From: David Janowski Date: Tue, 30 May 2023 14:04:39 +0200 Subject: [PATCH] set logger to info and removed deprecated functions --- neo4jAPI/connection.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neo4jAPI/connection.go b/neo4jAPI/connection.go index 11bc9aa..cba7f30 100644 --- a/neo4jAPI/connection.go +++ b/neo4jAPI/connection.go @@ -3,11 +3,12 @@ package neo4jAPI import ( "fmt" "github.com/neo4j/neo4j-go-driver/v5/neo4j" + "github.com/neo4j/neo4j-go-driver/v5/neo4j/config" ) func NewConnection(uri string, username string, password string) (neo4j.DriverWithContext, error) { driver, err := neo4j.NewDriverWithContext(uri, neo4j.BasicAuth(username, password, ""), - useConsoleLogger(neo4j.DEBUG)) + useConsoleLogger(neo4j.INFO)) if err != nil { return nil, fmt.Errorf("failed to create Neo4j driver: %v", err) } @@ -16,7 +17,7 @@ func NewConnection(uri string, username string, password string) (neo4j.DriverWi } func useConsoleLogger(level neo4j.LogLevel) func(config *neo4j.Config) { - return func(config *neo4j.Config) { + return func(config *config.Config) { config.Log = neo4j.ConsoleLogger(level) } }