From 09d3dc8e90ed4e59b9f8cdc96811e4c30e955952 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Thu, 21 Jan 2010 14:18:31 +0000
Subject: [PATCH]     * Logs: Don't be quite so noisy in the wrapper log if we 
      can't open the router log

---
 core/java/src/net/i2p/util/LogWriter.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/core/java/src/net/i2p/util/LogWriter.java b/core/java/src/net/i2p/util/LogWriter.java
index eeb22d56cf..0a62ba07af 100644
--- a/core/java/src/net/i2p/util/LogWriter.java
+++ b/core/java/src/net/i2p/util/LogWriter.java
@@ -126,7 +126,11 @@ class LogWriter implements Runnable {
 
     private void writeRecord(String val) {
         if (val == null) return;
-        if (_currentOut == null) rotateFile();
+        if (_currentOut == null) {
+            rotateFile();
+            if (_currentOut == null)
+                return; // hosed
+        }
 
         try {
             _currentOut.write(val);
@@ -168,8 +172,7 @@ class LogWriter implements Runnable {
         try {
             _currentOut = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), "UTF-8"));
         } catch (IOException ioe) {
-            System.err.println("Error rotating into [" + f.getAbsolutePath() + "]");
-            ioe.printStackTrace();
+            System.err.println("Error rotating into [" + f.getAbsolutePath() + "]" + ioe);
         }
     }
 
-- 
GitLab