If you want to enable the Java driver logging as you suspect issues at Bolt protocol level you can use the following additional configuration method: withLogging
See the example below for how to use it within your code.
import org.neo4j.driver.*;
import java.util.logging.Level;
import static org.neo4j.driver.AuthTokens.basic;
public class Demo {
public static void main(String... args) {
Config config = Config.builder().withLogging(Logging.console(Level.FINE)).build();
AuthToken auth = basic("neo4j", "password");
try (Driver driver = GraphDatabase.driver("neo4j://localhost:7687", auth, config)) {
try (Session session = driver.session()) {
session.run("RETURN 1").forEachRemaining(System.out::println);
}
}
}
}
If you use Java Spring, there is an alternate method you should use.
Comments
0 comments
Please sign in to leave a comment.