Class DebugRepositoryConnectionListener

java.lang.Object
org.eclipse.rdf4j.repository.event.util.DebugRepositoryConnectionListener
All Implemented Interfaces:
RepositoryConnectionListener

public class DebugRepositoryConnectionListener extends Object implements RepositoryConnectionListener
Utility class that prints all events to a PrintStream (default: System.err), optionally with a stacktrace.

System.err is chosen as default because Thread.dumpStack() also prints to System.err. Consequently, println's and stacktraces remain properly aligned. When printing to System.out instead, environments such as Eclipse's Console may mess up the order of println's and stacktraces, probably due to the use of separate line buffers below the surface that get flushed to the UI at different times.