Browse Source

Log noise: don't log zero NTP offsets or unimplemented transaction types

split-DB
catbref 5 years ago
parent
commit
3ef4711c27
  1. 5
      src/main/java/org/qortal/controller/Controller.java
  2. 2
      src/main/java/org/qortal/repository/hsqldb/transaction/HSQLDBTransactionRepository.java

5
src/main/java/org/qortal/controller/Controller.java

@ -389,7 +389,10 @@ public class Controller extends Thread {
Long ntpTime = NTP.getTime();
if (ntpTime != null) {
LOGGER.info(String.format("Adjusting system time by NTP offset: %dms", ntpTime - now));
if (ntpTime != now)
// Only log if non-zero offset
LOGGER.info(String.format("Adjusting system time by NTP offset: %dms", ntpTime - now));
ntpCheckTimestamp = now + NTP_POST_SYNC_CHECK_PERIOD;
requestSysTrayUpdate = true;
} else {

2
src/main/java/org/qortal/repository/hsqldb/transaction/HSQLDBTransactionRepository.java

@ -55,7 +55,7 @@ public class HSQLDBTransactionRepository implements TransactionRepository {
subclassInfo.clazz = Class.forName(
String.join("", HSQLDBTransactionRepository.class.getPackage().getName(), ".", "HSQLDB", txType.className, "TransactionRepository"));
} catch (ClassNotFoundException e) {
LOGGER.debug(String.format("HSQLDBTransactionRepository subclass not found for transaction type \"%s\"", txType.name()));
LOGGER.trace(String.format("HSQLDBTransactionRepository subclass not found for transaction type \"%s\"", txType.name()));
continue;
}

Loading…
Cancel
Save