Closed stefano-ottolenghi closed 1 year ago
For Bolt logs (inc. the query being run), you need neo4j.ConsoleBoltLogger()
:
result, err := neo4j.ExecuteQuery(ctx, driver,
"MERGE (p:Person {name: $name}) RETURN p",
map[string]any{
"name": "Alice",
}, neo4j.EagerResultTransformer,
neo4j.ExecuteQueryWithDatabase("neo4j"),
neo4j.ExecuteQueryWithBoltLogger(neo4j.ConsoleBoltLogger()))
if err != nil {
panic(err)
}
Let me update this README section: https://github.com/neo4j/neo4j-go-driver#bolt-tracing
Is there any reason why we don't want them mix? At least Python and Javascript have only one type of console logging, logging all.
@stefano-ottolenghi Bolt logging is more verbose and mostly meant for troubleshooting. Enabling it on a per-session basis was a deliberate decision.
MWE
the output of which is
i.e. there is no logging about the query just run (although it does run, as
result
is non empty).