1.1 --- a/org/sonews/daemon/NNTPConnection.java Wed Jul 22 14:04:05 2009 +0200
1.2 +++ b/org/sonews/daemon/NNTPConnection.java Fri Aug 21 17:40:54 2009 +0200
1.3 @@ -166,11 +166,7 @@
1.4 }
1.5 catch(IOException ex)
1.6 {
1.7 - Log.msg("Exception in NNTPConnection.shutdownInput(): " + ex, false);
1.8 - if(Log.isDebug())
1.9 - {
1.10 - ex.printStackTrace();
1.11 - }
1.12 + Log.get().warning("Exception in NNTPConnection.shutdownInput(): " + ex);
1.13 }
1.14 }
1.15
1.16 @@ -190,15 +186,11 @@
1.17 catch(SocketException ex)
1.18 {
1.19 // Socket was already disconnected
1.20 - Log.msg("NNTPConnection.shutdownOutput(): " + ex, true);
1.21 + Log.get().info("NNTPConnection.shutdownOutput(): " + ex);
1.22 }
1.23 catch(Exception ex)
1.24 {
1.25 - Log.msg("NNTPConnection.shutdownOutput(): " + ex, false);
1.26 - if(Log.isDebug())
1.27 - {
1.28 - ex.printStackTrace();
1.29 - }
1.30 + Log.get().warning("NNTPConnection.shutdownOutput(): " + ex);
1.31 }
1.32 }
1.33 }, 3000);
1.34 @@ -272,7 +264,7 @@
1.35 raw = Arrays.copyOf(raw, raw.length - 1);
1.36 }
1.37
1.38 - Log.msg("<< " + line, true);
1.39 + Log.get().fine("<< " + line);
1.40
1.41 if(command == null)
1.42 {
1.43 @@ -289,8 +281,8 @@
1.44 {
1.45 try
1.46 {
1.47 - Log.msg("Connection to " + channel.socket().getRemoteSocketAddress()
1.48 - + " closed: " + ex0, true);
1.49 + Log.get().info("Connection to " + channel.socket().getRemoteSocketAddress()
1.50 + + " closed: " + ex0);
1.51 }
1.52 catch(Exception ex0a)
1.53 {
1.54 @@ -367,7 +359,7 @@
1.55 {
1.56 if(!charset.canEncode())
1.57 {
1.58 - Log.msg("FATAL: Charset " + charset + " cannot encode!", false);
1.59 + Log.get().severe("FATAL: Charset " + charset + " cannot encode!");
1.60 return;
1.61 }
1.62
1.63 @@ -386,9 +378,9 @@
1.64 this.writeSelKey.interestOps(SelectionKey.OP_WRITE);
1.65 ChannelWriter.getInstance().getSelector().wakeup();
1.66 }
1.67 - catch (Exception ex) // CancelledKeyException and ChannelCloseException
1.68 + catch(Exception ex) // CancelledKeyException and ChannelCloseException
1.69 {
1.70 - Log.msg("NNTPConnection.writeToChannel(): " + ex, false);
1.71 + Log.get().warning("NNTPConnection.writeToChannel(): " + ex);
1.72 return;
1.73 }
1.74
1.75 @@ -396,7 +388,7 @@
1.76 this.lastActivity = System.currentTimeMillis();
1.77 if(debugLine != null)
1.78 {
1.79 - Log.msg(">> " + debugLine, true);
1.80 + Log.get().fine(">> " + debugLine);
1.81 }
1.82 }
1.83