Class HibernateSQLLogger
java.lang.Object
com.peterphi.std.guice.hibernate.module.logging.HibernateSQLLogger
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Consumer<String>
public class HibernateSQLLogger
extends Object
implements Closeable, AutoCloseable, Consumer<String>
Uses a Hibernate
Interceptor
to intercept SQL Statement preparations as they happen on the local thread-
Constructor Summary
ConstructorDescriptionHibernateSQLLogger
(HibernateObservingInterceptor interceptor, String tracingOperationId) -
Method Summary
-
Constructor Details
-
HibernateSQLLogger
-
-
Method Details
-
start
public void start() -
accept
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getAllStatements
Return a read-only copy of the statements prepared since this logger was started and before the logger was stopped; if the logger has not yet been stopped then it will return the statements prepared thus far- Returns:
-