[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [ernie/master] Refine logs a bit.



Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Wed, 14 Apr 2010 22:27:46 +0200
Subject: Refine logs a bit.
Commit: e540733743c19f36e03c4d82b4a85e759ccf8779

---
 src/ConsensusStatsFileHandler.java        |    9 +++++----
 src/DirreqStatsFileHandler.java           |    3 ++-
 src/GetTorProcessor.java                  |    2 +-
 src/Main.java                             |    2 +-
 src/ServerDescriptorStatsFileHandler.java |    5 +++--
 5 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/ConsensusStatsFileHandler.java b/src/ConsensusStatsFileHandler.java
index 906a376..46227af 100644
--- a/src/ConsensusStatsFileHandler.java
+++ b/src/ConsensusStatsFileHandler.java
@@ -479,10 +479,11 @@ public class ConsensusStatsFileHandler {
 
     logger.info("Finished writing statistics on relay consensuses and "
         + "bridge statuses to disk.\nAdded " + this.relayResultsAdded
-        + "relay consensuses and " + this.bridgeResultsAdded + " bridge "
-        + "statuses in this execution.\nLast known relay consensus was "
-        + "published "+ this.relaysRaw.lastKey() + ", last known bridge "
-        + "status was published " + this.bridgesRaw.lastKey());
+        + " relay consensus(es) and " + this.bridgeResultsAdded
+        + " bridge status(es) in this execution.\nLast known relay "
+        + "consensus was published "+ this.relaysRaw.lastKey() + ", last "
+        + "known bridge status was published " + this.bridgesRaw.lastKey()
+        + ".");
   }
 }
 
diff --git a/src/DirreqStatsFileHandler.java b/src/DirreqStatsFileHandler.java
index 07fcd7d..59264f9 100644
--- a/src/DirreqStatsFileHandler.java
+++ b/src/DirreqStatsFileHandler.java
@@ -119,8 +119,9 @@ public class DirreqStatsFileHandler {
       }
     }
 
-    /* Set modification flag to false. */
+    /* Set modification flag to false and counter for stats to zero. */
     this.dirreqsModified = false;
+    this.addedResults = 0;
   }
 
   /**
diff --git a/src/GetTorProcessor.java b/src/GetTorProcessor.java
index 00abe5f..0a663d0 100644
--- a/src/GetTorProcessor.java
+++ b/src/GetTorProcessor.java
@@ -86,7 +86,7 @@ public class GetTorProcessor {
 
     logger.info("Finished downloading and processing statistics on Tor "
         + "packages delivered by GetTor.\nDownloaded " + unparsed.length()
-        + " bytes. Last date in statistics is " + data.lastKey());
+        + " bytes. Last date in statistics is " + data.lastKey() + ".");
   }
 }
 
diff --git a/src/Main.java b/src/Main.java
index 9ee09f6..b7c636b 100644
--- a/src/Main.java
+++ b/src/Main.java
@@ -12,7 +12,7 @@ public class Main {
     new LoggingConfiguration();
 
     Logger logger = Logger.getLogger(Main.class.getName());
-    logger.info("Starting ERNIE...");
+    logger.info("Starting ERNIE.");
 
     // Initialize configuration
     Configuration config = new Configuration();
diff --git a/src/ServerDescriptorStatsFileHandler.java b/src/ServerDescriptorStatsFileHandler.java
index e1156fb..e1179d5 100644
--- a/src/ServerDescriptorStatsFileHandler.java
+++ b/src/ServerDescriptorStatsFileHandler.java
@@ -609,8 +609,9 @@ public class ServerDescriptorStatsFileHandler {
 
     StringBuilder dumpStats = new StringBuilder("Finished writing "
         + "statistics information contained in consensuses and server "
-        + "descriptors.\nAdded " + this.addedConsensuses + " consensuses "
-        + "and " + this.addedServerDescriptors + " in this execution.\n");
+        + "descriptors.\nAdded " + this.addedConsensuses
+        + " consensus(es) and " + this.addedServerDescriptors + " server "
+        + "descriptor(s) in this execution.\n");
     if (lastWrittenDay == null) {
       dumpStats.append("No statistics written so far.");
     } else {
-- 
1.6.5