Various logging cleanups (#65)

* Various logging cleanups

* Move device info to string, apply spotless
This commit is contained in:
Banks T
2020-07-28 21:20:54 -04:00
committed by GitHub
parent a349f1cee6
commit 48851470ae
10 changed files with 49 additions and 48 deletions

View File

@@ -42,8 +42,7 @@ public class TimedTaskManager {
Thread thread = defaultThreadFactory.newThread(r);
thread.setUncaughtExceptionHandler(
(t, e) -> {
logger.error("TimedTask threw uncaught exception!");
e.printStackTrace();
logger.error("TimedTask threw uncaught exception!", e);
});
return thread;
}
@@ -75,8 +74,7 @@ public class TimedTaskManager {
}
if (throwable != null) {
logger.error("TimedTask threw uncaught exception!");
throwable.printStackTrace();
logger.error("TimedTask threw uncaught exception!", throwable);
// Restart the runnable again
execute(runnable);
}