diff -r efce4ec25564 -r f2293e8566f5 org/sonews/daemon/ChannelReader.java --- a/org/sonews/daemon/ChannelReader.java Thu Aug 20 16:57:38 2009 +0200 +++ b/org/sonews/daemon/ChannelReader.java Thu Aug 20 18:41:21 2009 +0200 @@ -26,6 +26,7 @@ import java.nio.channels.SocketChannel; import java.util.Iterator; import java.util.Set; +import java.util.logging.Level; import org.sonews.util.Log; /** @@ -130,11 +131,8 @@ } catch(CancelledKeyException ex) { - Log.msg("ChannelReader.run(): " + ex, false); - if(Log.isDebug()) - { - ex.printStackTrace(); - } + Log.get().warning("ChannelReader.run(): " + ex); + Log.get().log(Level.INFO, "", ex); } catch(Exception ex) { @@ -177,15 +175,11 @@ { // The connection was probably closed by the remote host // in a non-clean fashion - Log.msg("ChannelReader.processSelectionKey(): " + ex, true); + Log.get().info("ChannelReader.processSelectionKey(): " + ex); } catch(Exception ex) { - Log.msg("ChannelReader.processSelectionKey(): " + ex, false); - if(Log.isDebug()) - { - ex.printStackTrace(); - } + Log.get().warning("ChannelReader.processSelectionKey(): " + ex); } if(read == -1) // End of stream @@ -201,7 +195,7 @@ else { // Should not happen - Log.msg(selKey, false); + Log.get().severe("Should not happen: " + selKey.toString()); } }