[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [ernie/master 2/2] Unify log levels.
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Sun, 28 Feb 2010 16:02:52 +0100
Subject: Unify log levels.
Commit: 04ef17990b7b88ef12c430e0071b2bbbcdf99208
---
logging.properties | 16 +++++++++-
src/ArchiveReader.java | 4 +-
src/ArchiveWriter.java | 49 +++++++++++++++++----------------
src/BridgeSnapshotReader.java | 12 ++++----
src/CachedRelayDescriptorReader.java | 4 +-
src/ExitListDownloader.java | 4 +-
src/GetTorProcessor.java | 8 +++---
src/LockFile.java | 8 +++---
src/RelayDescriptorDownloader.java | 2 +-
src/RelayDescriptorParser.java | 8 +++---
src/SanitizedBridgesReader.java | 4 +-
src/TorperfProcessor.java | 20 +++++++-------
12 files changed, 76 insertions(+), 63 deletions(-)
diff --git a/logging.properties b/logging.properties
index df55342..e05327e 100644
--- a/logging.properties
+++ b/logging.properties
@@ -1,9 +1,21 @@
+# Log levels used by ERNIE:
+# - SEVERE: An event made it impossible to continue program execution.
+# - WARNING: A potential problem occured that requires the operator to
+# look after the otherwise unattended setup
+# - INFO: Messages on INFO level are meant to help the operator in making
+# sure that operation works as expected.
+# - FINE: Debug messages that are used to identify prolems and which are
+# turned on by default.
+# - FINER: More detailed debug messages to investigate problems in more
+# detail. Not turned on by default. Increase log file limit when using
+# FINER.
+# - FINEST: Most detailed debug messages. Not used.
handlers=java.util.logging.ConsoleHandler, java.util.logging.FileHandler
-.level=FINEST
+.level=FINE
sun.level=OFF
java.util.logging.ConsoleHandler.level=WARNING
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
-java.util.logging.FileHandler.level=ALL
+java.util.logging.FileHandler.level=FINE
java.util.logging.FileHandler.pattern=log
java.util.logging.FileHandler.limit=5000000
java.util.logging.FileHandler.count=5
diff --git a/src/ArchiveReader.java b/src/ArchiveReader.java
index 1706089..c607f67 100644
--- a/src/ArchiveReader.java
+++ b/src/ArchiveReader.java
@@ -10,7 +10,7 @@ public class ArchiveReader {
public ArchiveReader(RelayDescriptorParser rdp, String archivesDir) {
Logger logger = Logger.getLogger(ArchiveReader.class.getName());
if (new File(archivesDir).exists()) {
- logger.info("Importing files in directory " + archivesDir
+ logger.fine("Importing files in directory " + archivesDir
+ "/...");
Stack<File> filesInInputDir = new Stack<File>();
filesInInputDir.add(new File(archivesDir));
@@ -37,7 +37,7 @@ public class ArchiveReader {
}
}
if (problems.isEmpty()) {
- logger.info("Finished importing files in directory " + archivesDir
+ logger.fine("Finished importing files in directory " + archivesDir
+ "/.");
} else {
StringBuilder sb = new StringBuilder("Failed importing files in "
diff --git a/src/ArchiveWriter.java b/src/ArchiveWriter.java
index f13e8e8..63a8477 100644
--- a/src/ArchiveWriter.java
+++ b/src/ArchiveWriter.java
@@ -27,7 +27,7 @@ public class ArchiveWriter {
new SimpleDateFormat("yyyy/MM/");
descriptorFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
if (this.missingDescriptorsFile.exists()) {
- this.logger.info("Reading file "
+ this.logger.fine("Reading file "
+ this.missingDescriptorsFile.getAbsolutePath() + "...");
try {
BufferedReader br = new BufferedReader(new FileReader(
@@ -45,7 +45,7 @@ public class ArchiveWriter {
+ consensusVoteFormat.format(new Date(published))
+ "-consensus");
if (!consensusFile.exists()) {
- this.logger.fine("Initializing missing list with "
+ this.logger.finer("Initializing missing list with "
+ "consensus: valid-after=" + line.split(",")[2]
+ ", filename=directory-archive/consensus/"
+ consensusVoteFormat.format(new Date(published))
@@ -71,7 +71,7 @@ public class ArchiveWriter {
}
}
if (!voteFileFound) {
- this.logger.fine("Initializing missing list with vote: "
+ this.logger.finer("Initializing missing list with vote: "
+ "fingerprint=" + line.split(",")[1]
+ ", valid-after="
+ consensusVoteFormat.format(new Date(published))
@@ -92,7 +92,7 @@ public class ArchiveWriter {
+ digest.substring(0, 1) + "/" + digest.substring(1, 2)
+ "/" + digest);
if (!descriptorFile.exists()) {
- this.logger.fine("Initializing missing list with "
+ this.logger.finer("Initializing missing list with "
+ (isServerDesc ? "server" : "extra-info")
+ " descriptor: digest=" + digest
+ ", filename=directory-archive/server-descriptor/"
@@ -105,7 +105,7 @@ public class ArchiveWriter {
}
}
br.close();
- this.logger.info("Finished reading file "
+ this.logger.fine("Finished reading file "
+ this.missingDescriptorsFile.getAbsolutePath() + ".");
} catch (ParseException e) {
this.logger.log(Level.WARNING, "Failed reading file "
@@ -145,7 +145,7 @@ public class ArchiveWriter {
}
}
if (!voteFileFound) {
- this.logger.fine("Adding vote to missing list: fingerprint="
+ this.logger.finer("Adding vote to missing list: fingerprint="
+ authority + ", valid-after="
+ consensusVoteFormat.format(new Date(nowConsensus))
+ ", filename=directory-archive/vote/"
@@ -162,7 +162,7 @@ public class ArchiveWriter {
+ "-consensus");
if (!this.missingDescriptors.contains("consensus,NA,"
+ nowConsensusFormat) && !consensusFile.exists()) {
- this.logger.fine("Adding consensus to missing list: valid-after="
+ this.logger.finer("Adding consensus to missing list: valid-after="
+ nowConsensusFormat
+ ", filename=directory-archive/consensus/"
+ consensusVoteFormat.format(new Date(nowConsensus))
@@ -234,8 +234,8 @@ public class ArchiveWriter {
}
}
if (!voteFileFound) {
- this.logger.fine("Adding vote to missing list: fingerprint="
- + fingerprint + ", valid-after="
+ this.logger.finer("Adding vote to missing list: "
+ + "fingerprint=" + fingerprint + ", valid-after="
+ parseFormat.format(new Date(nowConsensus))
+ ", filename=directory-archive/vote/"
+ consensusVoteFormat.format(new Date(nowConsensus))
@@ -262,7 +262,7 @@ public class ArchiveWriter {
if (published + 24L * 60L * 60L * 1000L > now &&
!this.missingDescriptors.contains("server," + serverDesc
+ "," + publishedTime) && !descriptorFile.exists()) {
- this.logger.fine("Adding server descriptor to missing list: "
+ this.logger.finer("Adding server descriptor to missing list: "
+ "digest=" + serverDesc
+ ", filename=directory-archive/server-descriptor/"
+ descriptorFormat.format(new Date(published))
@@ -281,7 +281,7 @@ public class ArchiveWriter {
File consensusFile = new File("directory-archive/consensus/"
+ printFormat.format(new Date(validAfter)) + "-consensus");
if (!consensusFile.exists()) {
- this.logger.fine("Storing consensus: valid-after="
+ this.logger.finer("Storing consensus: valid-after="
+ validAfterTime + ", filename=directory-archive/consensus/"
+ printFormat.format(new Date(validAfter)) + "-consensus");
consensusFile.getParentFile().mkdirs();
@@ -289,7 +289,7 @@ public class ArchiveWriter {
new FileOutputStream(consensusFile));
bos.write(data, 0, data.length);
bos.close();
- this.logger.fine("Removing consensus from missing list: "
+ this.logger.finer("Removing consensus from missing list: "
+ "valid-after=" + validAfterTime
+ ", filename=directory-archive/consensus/"
+ printFormat.format(new Date(validAfter)) + "-consensus");
@@ -297,7 +297,7 @@ public class ArchiveWriter {
+ validAfterTime);
this.missingDescriptorsFileModified = true;
} else {
- this.logger.info("Not storing consensus, because we already "
+ this.logger.finer("Not storing consensus, because we already "
+ "have it: valid-after=" + validAfterTime
+ ", filename=directory-archive/consensus/"
+ printFormat.format(new Date(validAfter)) + "-consensus");
@@ -309,7 +309,7 @@ public class ArchiveWriter {
int start = ascii.indexOf(startToken);
int sig = ascii.indexOf(sigToken);
if (start < 0 || sig < 0 || sig < start) {
- this.logger.info("Cannot determine vote digest! Skipping.");
+ this.logger.warning("Cannot determine vote digest! Skipping.");
return;
}
sig += sigToken.length();
@@ -320,7 +320,7 @@ public class ArchiveWriter {
+ printFormat.format(new Date(validAfter)) + "-vote-"
+ fingerprint + "-" + digest);
if (!voteFile.exists()) {
- this.logger.fine("Storing vote: fingerprint=" + fingerprint
+ this.logger.finer("Storing vote: fingerprint=" + fingerprint
+ ", valid-after="
+ printFormat.format(new Date(validAfter))
+ ", filename=directory-archive/vote/"
@@ -331,7 +331,7 @@ public class ArchiveWriter {
new FileOutputStream(voteFile));
bos.write(data, 0, data.length);
bos.close();
- this.logger.fine("Removing vote from missing list: "
+ this.logger.finer("Removing vote from missing list: "
+ "fingerprint=" + fingerprint + ", valid-after="
+ printFormat.format(new Date(validAfter))
+ ", filename=directory-archive/vote/"
@@ -341,7 +341,7 @@ public class ArchiveWriter {
+ validAfterTime);
this.missingDescriptorsFileModified = true;
} else {
- this.logger.info("Not storing vote, because we already have "
+ this.logger.finer("Not storing vote, because we already have "
+ "it: fingerprint=" + fingerprint + ", valid-after="
+ printFormat.format(new Date(validAfter))
+ ", filename=directory-archive/vote/"
@@ -374,7 +374,7 @@ public class ArchiveWriter {
if (!this.missingDescriptors.contains("extra,"
+ extraInfoDigest + "," + publishedTime) &&
!descriptorFile.exists()) {
- this.logger.fine("Adding extra-info descriptor to missing "
+ this.logger.finer("Adding extra-info descriptor to missing "
+ "list: digest=" + extraInfoDigest
+ ", filename=directory-archive/extra-info/"
+ descriptorFormat.format(new Date(published))
@@ -394,7 +394,8 @@ public class ArchiveWriter {
int start = ascii.indexOf(startToken);
int sig = ascii.indexOf(sigToken) + sigToken.length();
if (start < 0 || sig < 0 || sig < start) {
- this.logger.info("Cannot determine descriptor digest! Skipping.");
+ this.logger.warning("Cannot determine descriptor digest! "
+ + "Skipping.");
return;
}
byte[] forDigest = new byte[sig - start];
@@ -408,7 +409,7 @@ public class ArchiveWriter {
+ digest.substring(0, 1) + "/" + digest.substring(1, 2) + "/"
+ digest);
if (!descriptorFile.exists()) {
- this.logger.fine("Storing " + (isServerDescriptor ?
+ this.logger.finer("Storing " + (isServerDescriptor ?
"server descriptor" : "extra-info descriptor")
+ ": digest=" + digest + ", filename=directory-archive/"
+ (isServerDescriptor ? "server-descriptor" : "extra-info")
@@ -420,7 +421,7 @@ public class ArchiveWriter {
new FileOutputStream(descriptorFile));
bos.write(data, 0, data.length);
bos.close();
- this.logger.fine("Removing " + (isServerDescriptor ?
+ this.logger.finer("Removing " + (isServerDescriptor ?
"server descriptor" : "extra-info descriptor")
+ " from missing list: digest=" + digest
+ ", filename=directory-archive/"
@@ -437,7 +438,7 @@ public class ArchiveWriter {
}
this.missingDescriptorsFileModified = true;
} else {
- this.logger.info("Not storing " + (isServerDescriptor ?
+ this.logger.finer("Not storing " + (isServerDescriptor ?
"server descriptor" : "extra-info descriptor")
+ ", because we already have it: digest=" + digest
+ ", filename=directory-archive/"
@@ -466,7 +467,7 @@ public class ArchiveWriter {
public void writeFile() {
if (this.missingDescriptorsFileModified) {
try {
- this.logger.info("Writing file "
+ this.logger.fine("Writing file "
+ this.missingDescriptorsFile.getAbsolutePath() + "...");
this.missingDescriptorsFile.getParentFile().mkdirs();
BufferedWriter bw = new BufferedWriter(new FileWriter(
@@ -475,7 +476,7 @@ public class ArchiveWriter {
bw.write(line + "\n");
}
bw.close();
- this.logger.info("Finished writing file "
+ this.logger.fine("Finished writing file "
+ this.missingDescriptorsFile.getAbsolutePath() + ".");
} catch (IOException e) {
this.logger.log(Level.WARNING, "Failed writing "
diff --git a/src/BridgeSnapshotReader.java b/src/BridgeSnapshotReader.java
index 8c47bee..fe9e4ed 100644
--- a/src/BridgeSnapshotReader.java
+++ b/src/BridgeSnapshotReader.java
@@ -19,7 +19,7 @@ public class BridgeSnapshotReader {
boolean modified = false;
if (bdDir.exists()) {
if (pbdFile.exists()) {
- logger.info("Reading file " + pbdFile.getAbsolutePath() + "...");
+ logger.fine("Reading file " + pbdFile.getAbsolutePath() + "...");
try {
BufferedReader br = new BufferedReader(new FileReader(pbdFile));
String line = null;
@@ -27,7 +27,7 @@ public class BridgeSnapshotReader {
parsed.add(line);
}
br.close();
- logger.info("Finished reading file "
+ logger.fine("Finished reading file "
+ pbdFile.getAbsolutePath() + ".");
} catch (IOException e) {
logger.log(Level.WARNING, "Failed reading file "
@@ -35,7 +35,7 @@ public class BridgeSnapshotReader {
return;
}
}
- logger.info("Importing files in directory " + bridgeDirectoriesDir
+ logger.fine("Importing files in directory " + bridgeDirectoriesDir
+ "/...");
Stack<File> filesInInputDir = new Stack<File>();
filesInInputDir.add(bdDir);
@@ -81,7 +81,7 @@ public class BridgeSnapshotReader {
}
}
if (problems.isEmpty()) {
- logger.info("Finished importing files in directory "
+ logger.fine("Finished importing files in directory "
+ bridgeDirectoriesDir + "/.");
} else {
StringBuilder sb = new StringBuilder("Failed importing files in "
@@ -97,7 +97,7 @@ public class BridgeSnapshotReader {
logger.warning(sb.toString());
}
if (!parsed.isEmpty() && modified) {
- logger.info("Writing file " + pbdFile.getAbsolutePath() + "...");
+ logger.fine("Writing file " + pbdFile.getAbsolutePath() + "...");
try {
pbdFile.getParentFile().mkdirs();
BufferedWriter bw = new BufferedWriter(new FileWriter(pbdFile));
@@ -105,7 +105,7 @@ public class BridgeSnapshotReader {
bw.append(f + "\n");
}
bw.close();
- logger.info("Finished writing file " + pbdFile.getAbsolutePath()
+ logger.fine("Finished writing file " + pbdFile.getAbsolutePath()
+ ".");
} catch (IOException e) {
logger.log(Level.WARNING, "Failed writing file "
diff --git a/src/CachedRelayDescriptorReader.java b/src/CachedRelayDescriptorReader.java
index bf81d44..10e207d 100644
--- a/src/CachedRelayDescriptorReader.java
+++ b/src/CachedRelayDescriptorReader.java
@@ -16,7 +16,7 @@ public class CachedRelayDescriptorReader {
CachedRelayDescriptorReader.class.getName());
File cachedDescDir = new File("cacheddesc");
if (cachedDescDir.exists()) {
- logger.info("Reading cacheddesc/ directory.");
+ logger.fine("Reading cacheddesc/ directory.");
for (File f : cachedDescDir.listFiles()) {
try {
// descriptors may contain non-ASCII chars; read as bytes to
@@ -82,7 +82,7 @@ public class CachedRelayDescriptorReader {
storeBr.close();
}
}
- logger.info("Finished reading cacheddesc/ directory.");
+ logger.fine("Finished reading cacheddesc/ directory.");
}
} catch (IOException e) {
logger.log(Level.WARNING, "Failed reading cacheddesc/ "
diff --git a/src/ExitListDownloader.java b/src/ExitListDownloader.java
index 9fe7c6c..629af37 100644
--- a/src/ExitListDownloader.java
+++ b/src/ExitListDownloader.java
@@ -8,7 +8,7 @@ public class ExitListDownloader {
public ExitListDownloader() {
Logger logger = Logger.getLogger(TorperfProcessor.class.getName());
try {
- logger.info("Downloading exit list...");
+ logger.fine("Downloading exit list...");
String exitAddressesUrl =
"http://exitlist.torproject.org/exitAddresses";
URL u = new URL(exitAddressesUrl);
@@ -38,7 +38,7 @@ public class ExitListDownloader {
}
in.close();
bw.close();
- logger.info("Finished downloading exit list.");
+ logger.fine("Finished downloading exit list.");
} catch (IOException e) {
logger.log(Level.WARNING, "Failed downloading exit list", e);
return;
diff --git a/src/GetTorProcessor.java b/src/GetTorProcessor.java
index e8a6558..356b5a7 100644
--- a/src/GetTorProcessor.java
+++ b/src/GetTorProcessor.java
@@ -8,7 +8,7 @@ public class GetTorProcessor {
Logger logger = Logger.getLogger(TorperfProcessor.class.getName());
String unparsed = null;
try {
- logger.info("Downloading gettor stats...");
+ logger.fine("Downloading gettor stats...");
URL u = new URL(gettorStatsUrl);
HttpURLConnection huc = (HttpURLConnection) u.openConnection();
huc.setRequestMethod("GET");
@@ -26,7 +26,7 @@ public class GetTorProcessor {
in.close();
unparsed = sb.toString();
}
- logger.info("Finished downloading gettor stats.");
+ logger.fine("Finished downloading gettor stats.");
} catch (IOException e) {
logger.log(Level.WARNING, "Failed downloading gettor stats", e);
return;
@@ -36,7 +36,7 @@ public class GetTorProcessor {
SortedMap<String, Map<String, Integer>> data =
new TreeMap<String, Map<String, Integer>>();
try {
- logger.info("Parsing downloaded gettor stats...");
+ logger.fine("Parsing downloaded gettor stats...");
BufferedReader br = new BufferedReader(new StringReader(unparsed));
String line = null;
while ((line = br.readLine()) != null) {
@@ -61,7 +61,7 @@ public class GetTorProcessor {
}
File statsFile = new File("stats/gettor-stats");
- logger.info("Writing file " + statsFile.getAbsolutePath() + "...");
+ logger.fine("Writing file " + statsFile.getAbsolutePath() + "...");
try {
statsFile.getParentFile().mkdirs();
BufferedWriter bw = new BufferedWriter(new FileWriter(statsFile));
diff --git a/src/LockFile.java b/src/LockFile.java
index 1eac3cf..aa3aa68 100644
--- a/src/LockFile.java
+++ b/src/LockFile.java
@@ -12,7 +12,7 @@ public class LockFile {
}
public boolean acquireLock() {
- this.logger.info("Trying to acquire lock...");
+ this.logger.fine("Trying to acquire lock...");
try {
if (this.lockFile.exists()) {
BufferedReader br = new BufferedReader(new FileReader("lock"));
@@ -25,7 +25,7 @@ public class LockFile {
BufferedWriter bw = new BufferedWriter(new FileWriter("lock"));
bw.append("" + System.currentTimeMillis() + "\n");
bw.close();
- this.logger.info("Acquired lock.");
+ this.logger.fine("Acquired lock.");
return true;
} catch (IOException e) {
this.logger.warning("Caught exception while trying to acquire "
@@ -35,9 +35,9 @@ public class LockFile {
}
public void releaseLock() {
- this.logger.info("Releasing lock...");
+ this.logger.fine("Releasing lock...");
this.lockFile.delete();
- this.logger.info("Released lock.");
+ this.logger.fine("Released lock.");
}
}
diff --git a/src/RelayDescriptorDownloader.java b/src/RelayDescriptorDownloader.java
index 4f64820..af6a33c 100644
--- a/src/RelayDescriptorDownloader.java
+++ b/src/RelayDescriptorDownloader.java
@@ -73,7 +73,7 @@ public class RelayDescriptorDownloader {
if (url.endsWith(digest)) {
verified = true;
} else {
- logger.info("Downloaded descriptor digest (" + digest
+ logger.warning("Downloaded descriptor digest (" + digest
+ " doesn't match what we asked for (" + url + ")! "
+ "Retrying.");
retryUrls.add(url);
diff --git a/src/RelayDescriptorParser.java b/src/RelayDescriptorParser.java
index c285d6c..0b1dccf 100644
--- a/src/RelayDescriptorParser.java
+++ b/src/RelayDescriptorParser.java
@@ -34,7 +34,7 @@ public class RelayDescriptorParser {
this.lastParsedConsensus = null;
this.lastParsedExtraInfos = new TreeMap<String, String>();
if (this.relayDescriptorParseHistoryFile.exists()) {
- this.logger.info("Reading file "
+ this.logger.fine("Reading file "
+ this.relayDescriptorParseHistoryFile.getAbsolutePath()
+ "...");
try {
@@ -50,7 +50,7 @@ public class RelayDescriptorParser {
}
}
br.close();
- this.logger.info("Finished reading file "
+ this.logger.fine("Finished reading file "
+ this.relayDescriptorParseHistoryFile.getAbsolutePath()
+ ".");
} catch (IOException e) {
@@ -185,7 +185,7 @@ public class RelayDescriptorParser {
public void writeFile() {
if (this.relayDescriptorParseHistoryModified) {
try {
- this.logger.info("Writing file "
+ this.logger.fine("Writing file "
+ this.relayDescriptorParseHistoryFile.getAbsolutePath()
+ "...");
this.relayDescriptorParseHistoryFile.getParentFile().mkdirs();
@@ -201,7 +201,7 @@ public class RelayDescriptorParser {
+ "\n");
}
bw.close();
- this.logger.info("Finished writing file "
+ this.logger.fine("Finished writing file "
+ this.relayDescriptorParseHistoryFile.getAbsolutePath()
+ ".");
} catch (IOException e) {
diff --git a/src/SanitizedBridgesReader.java b/src/SanitizedBridgesReader.java
index 8c068c2..41982e7 100644
--- a/src/SanitizedBridgesReader.java
+++ b/src/SanitizedBridgesReader.java
@@ -10,7 +10,7 @@ public class SanitizedBridgesReader {
Logger logger =
Logger.getLogger(SanitizedBridgesReader.class.getName());
if (new File(bridgesDir).exists()) {
- logger.info("Importing files in directory " + bridgesDir + "/...");
+ logger.fine("Importing files in directory " + bridgesDir + "/...");
Stack<File> filesInInputDir = new Stack<File>();
filesInInputDir.add(new File(bridgesDir));
List<File> problems = new ArrayList<File>();
@@ -44,7 +44,7 @@ public class SanitizedBridgesReader {
}
}
if (problems.isEmpty()) {
- logger.info("Finished importing files in directory " + bridgesDir
+ logger.fine("Finished importing files in directory " + bridgesDir
+ "/.");
} else {
StringBuilder sb = new StringBuilder("Failed importing files in "
diff --git a/src/TorperfProcessor.java b/src/TorperfProcessor.java
index c99d75b..f7b3ed3 100644
--- a/src/TorperfProcessor.java
+++ b/src/TorperfProcessor.java
@@ -13,7 +13,7 @@ public class TorperfProcessor {
SortedMap<String, String> stats = new TreeMap<String, String>();
try {
if (rawFile.exists()) {
- logger.info("Reading file " + rawFile.getAbsolutePath() + "...");
+ logger.fine("Reading file " + rawFile.getAbsolutePath() + "...");
BufferedReader br = new BufferedReader(new FileReader(rawFile));
String line = br.readLine(); // ignore header
while ((line = br.readLine()) != null) {
@@ -26,11 +26,11 @@ public class TorperfProcessor {
rawObs.put(key, line);
}
br.close();
- logger.info("Finished reading file " + rawFile.getAbsolutePath()
+ logger.fine("Finished reading file " + rawFile.getAbsolutePath()
+ ".");
}
if (statsFile.exists()) {
- logger.info("Reading file " + statsFile.getAbsolutePath()
+ logger.fine("Reading file " + statsFile.getAbsolutePath()
+ "...");
BufferedReader br = new BufferedReader(new FileReader(statsFile));
String line = br.readLine(); // ignore header
@@ -39,11 +39,11 @@ public class TorperfProcessor {
stats.put(key, line);
}
br.close();
- logger.info("Finished reading file " + statsFile.getAbsolutePath()
+ logger.fine("Finished reading file " + statsFile.getAbsolutePath()
+ ".");
}
if (torperfDir.exists()) {
- logger.info("Importing files in " + torperfDirectory + "/...");
+ logger.fine("Importing files in " + torperfDirectory + "/...");
Stack<File> filesInInputDir = new Stack<File>();
filesInInputDir.add(torperfDir);
while (!filesInInputDir.isEmpty()) {
@@ -84,11 +84,11 @@ public class TorperfProcessor {
br.close();
}
}
- logger.info("Finished importing files in " + torperfDirectory
+ logger.fine("Finished importing files in " + torperfDirectory
+ "/.");
}
if (rawObs.size() > 0) {
- logger.info("Writing file " + rawFile.getAbsolutePath() + "...");
+ logger.fine("Writing file " + rawFile.getAbsolutePath() + "...");
rawFile.getParentFile().mkdirs();
BufferedWriter bw = new BufferedWriter(new FileWriter(rawFile));
bw.append("source,date,start,completemillis\n");
@@ -123,11 +123,11 @@ public class TorperfProcessor {
}
}
bw.close();
- logger.info("Finished writing file " + rawFile.getAbsolutePath()
+ logger.fine("Finished writing file " + rawFile.getAbsolutePath()
+ ".");
}
if (stats.size() > 0) {
- logger.info("Writing file " + statsFile.getAbsolutePath()
+ logger.fine("Writing file " + statsFile.getAbsolutePath()
+ "...");
statsFile.getParentFile().mkdirs();
BufferedWriter bw = new BufferedWriter(new FileWriter(statsFile));
@@ -137,7 +137,7 @@ public class TorperfProcessor {
bw.append(s + "\n");
}
bw.close();
- logger.info("Finished writing file " + statsFile.getAbsolutePath()
+ logger.fine("Finished writing file " + statsFile.getAbsolutePath()
+ ".");
}
} catch (IOException e) {
--
1.6.5