Add logging while executing trust update jobs.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 5 Sep 2012 10:27:16 +0000 (12:27 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 5 Sep 2012 10:27:16 +0000 (12:27 +0200)
src/main/java/net/pterodactylus/sone/core/TrustUpdater.java

index be6f39c..4bbe299 100644 (file)
@@ -132,7 +132,11 @@ public class TrustUpdater extends AbstractService {
                                if (shouldStop() || (updateJob == stopJob)) {
                                        break;
                                }
+                               logger.log(Level.FINE, "Running Trust Update Job: " + updateJob);
+                               long startTime = System.currentTimeMillis();
                                updateJob.run();
+                               long endTime = System.currentTimeMillis();
+                               logger.log(Level.FINE, "Trust Update Job finished, took " + (endTime - startTime) + " ms.");
                        } catch (InterruptedException ie1) {
                                /* happens, ignore, loop. */
                        }