1.1 --- a/org/sonews/daemon/ChannelReader.java Wed Jul 22 14:04:05 2009 +0200
1.2 +++ b/org/sonews/daemon/ChannelReader.java Fri Aug 21 17:33:15 2009 +0200
1.3 @@ -26,6 +26,7 @@
1.4 import java.nio.channels.SocketChannel;
1.5 import java.util.Iterator;
1.6 import java.util.Set;
1.7 +import java.util.logging.Level;
1.8 import org.sonews.util.Log;
1.9
1.10 /**
1.11 @@ -130,11 +131,8 @@
1.12 }
1.13 catch(CancelledKeyException ex)
1.14 {
1.15 - Log.msg("ChannelReader.run(): " + ex, false);
1.16 - if(Log.isDebug())
1.17 - {
1.18 - ex.printStackTrace();
1.19 - }
1.20 + Log.get().warning("ChannelReader.run(): " + ex);
1.21 + Log.get().log(Level.INFO, "", ex);
1.22 }
1.23 catch(Exception ex)
1.24 {
1.25 @@ -177,15 +175,11 @@
1.26 {
1.27 // The connection was probably closed by the remote host
1.28 // in a non-clean fashion
1.29 - Log.msg("ChannelReader.processSelectionKey(): " + ex, true);
1.30 + Log.get().info("ChannelReader.processSelectionKey(): " + ex);
1.31 }
1.32 catch(Exception ex)
1.33 {
1.34 - Log.msg("ChannelReader.processSelectionKey(): " + ex, false);
1.35 - if(Log.isDebug())
1.36 - {
1.37 - ex.printStackTrace();
1.38 - }
1.39 + Log.get().warning("ChannelReader.processSelectionKey(): " + ex);
1.40 }
1.41
1.42 if(read == -1) // End of stream
1.43 @@ -201,7 +195,7 @@
1.44 else
1.45 {
1.46 // Should not happen
1.47 - Log.msg(selKey, false);
1.48 + Log.get().severe("Should not happen: " + selKey.toString());
1.49 }
1.50 }
1.51