Browse Source

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

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

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

@ -389,7 +389,10 @@ public class Controller extends Thread {
Long ntpTime = NTP.getTime(); Long ntpTime = NTP.getTime();
if (ntpTime != null) { if (ntpTime != null) {
if (ntpTime != now)
// Only log if non-zero offset
LOGGER.info(String.format("Adjusting system time by NTP offset: %dms", ntpTime - now)); LOGGER.info(String.format("Adjusting system time by NTP offset: %dms", ntpTime - now));
ntpCheckTimestamp = now + NTP_POST_SYNC_CHECK_PERIOD; ntpCheckTimestamp = now + NTP_POST_SYNC_CHECK_PERIOD;
requestSysTrayUpdate = true; requestSysTrayUpdate = true;
} else { } 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( subclassInfo.clazz = Class.forName(
String.join("", HSQLDBTransactionRepository.class.getPackage().getName(), ".", "HSQLDB", txType.className, "TransactionRepository")); String.join("", HSQLDBTransactionRepository.class.getPackage().getName(), ".", "HSQLDB", txType.className, "TransactionRepository"));
} catch (ClassNotFoundException e) { } 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; continue;
} }

Loading…
Cancel
Save