#1402 - Refactor SQL Logging internals (io.ebean.SQL) such that it is easier to capture for testing/asserts

This commit is contained in:
rob bygrave
2018-06-01 09:19:26 +12:00
parent 11e3649b85
commit d459807af7
16 changed files with 167 additions and 59 deletions
@@ -0,0 +1,27 @@
package io.ebeaninternal.api;
/**
* Log manager for SQL, TXN and Summary logging.
* <p>
* In general at runtime this uses SLF4J Logger but this abstraction allows us to capture
* the logged SQL during testing such that we can assert against the executed sql if desired.
* </p>
*/
public interface SpiLogManager {
/**
* Return the SQL logger.
*/
SpiLogger sql();
/**
* Return the TXN logger.
*/
SpiLogger txn();
/**
* Return the Summary logger.
*/
SpiLogger sum();
}