Modify SpiLogger removing isTrace(), trace() and the 2 uses

- Not bothered to log when changing isolation level
- Not bothering to log at end of query only transaction
This commit is contained in:
Rob Bygrave committed 2022-12-01 23:45:40 +13:00
1 parent e290f68b29
commit bc4d9837c6
7 files changed
-55

No files matched your search

@@ -14,18 +14,9 @@ public interface SpiLogger {
*/
boolean isDebug();
/**
* Is trace logging enabled.
*/
boolean isTrace();
/**
* Log a debug level message.
*/
void debug(String msg);
/**
* Log a trace level message.
*/
void trace(String msg);
}
@@ -18,18 +18,9 @@ final class DSpiLogger implements SpiLogger {
return logger.isLoggable(DEBUG);
}
@Override
public boolean isTrace() {
return logger.isLoggable(TRACE);
}
@Override
public void debug(String msg) {
logger.log(DEBUG, msg);
}
@Override
public void trace(String msg) {
logger.log(TRACE, msg);
}
}
@@ -43,9 +43,6 @@ abstract class TransactionFactory {
throw new PersistenceException(e);
}
}
if (explicit && manager.log().txn().isTrace()) {
manager.log().txn().trace(t.getLogPrefix() + "Begin");
}
return t;
}
}
@@ -347,9 +347,6 @@ public class TransactionManager implements SpiTransactionManager {
@Override
public final void notifyOfQueryOnly(SpiTransaction transaction) {
// Nothing that interesting here
if (txnLogger.isTrace()) {
txnLogger.trace(transaction.getLogPrefix() + "Commit - query only");
}
}
private String formatThrowable(Throwable e) {