org/sonews/daemon/NNTPDaemon.java
changeset 32 3af4237e4a15
parent 3 2fdc9cc89502
     1.1 --- a/org/sonews/daemon/NNTPDaemon.java	Wed Jul 22 14:04:05 2009 +0200
     1.2 +++ b/org/sonews/daemon/NNTPDaemon.java	Wed Jun 30 14:48:53 2010 +0200
     1.3 @@ -61,7 +61,7 @@
     1.4    
     1.5    private NNTPDaemon(final int port)
     1.6    {
     1.7 -    Log.msg("Server listening on port " + port, false);
     1.8 +    Log.get().info("Server listening on port " + port);
     1.9      this.port = port;
    1.10    }
    1.11  
    1.12 @@ -113,8 +113,8 @@
    1.13            // Under heavy load an IOException "Too many open files may
    1.14            // be thrown. It most cases we should slow down the connection
    1.15            // accepting, to give the worker threads some time to process work.
    1.16 -          Log.msg("IOException while accepting connection: " + ex.getMessage(), false);
    1.17 -          Log.msg("Connection accepting sleeping for seconds...", true);
    1.18 +          Log.get().severe("IOException while accepting connection: " + ex.getMessage());
    1.19 +          Log.get().info("Connection accepting sleeping for seconds...");
    1.20            Thread.sleep(5000); // 5 seconds
    1.21            continue;
    1.22          }
    1.23 @@ -127,7 +127,7 @@
    1.24          }
    1.25          catch(IOException ex)
    1.26          {
    1.27 -          Log.msg(ex.getLocalizedMessage(), false);
    1.28 +          Log.get().warning(ex.toString());
    1.29            socketChannel.close();
    1.30            continue;
    1.31          }
    1.32 @@ -138,7 +138,7 @@
    1.33              registerSelector(writeSelector, socketChannel, SelectionKey.OP_WRITE);
    1.34            registerSelector(readSelector, socketChannel, SelectionKey.OP_READ);
    1.35            
    1.36 -          Log.msg("Connected: " + socketChannel.socket().getRemoteSocketAddress(), true);
    1.37 +          Log.get().info("Connected: " + socketChannel.socket().getRemoteSocketAddress());
    1.38  
    1.39            // Set write selection key and send hello to client
    1.40            conn.setWriteSelectionKey(selKeyWrite);
    1.41 @@ -147,13 +147,13 @@
    1.42          }
    1.43          catch(CancelledKeyException cke)
    1.44          {
    1.45 -          Log.msg("CancelledKeyException " + cke.getMessage() + " was thrown: " 
    1.46 -            + socketChannel.socket(), false);
    1.47 +          Log.get().warning("CancelledKeyException " + cke.getMessage() + " was thrown: "
    1.48 +            + socketChannel.socket());
    1.49          }
    1.50          catch(ClosedChannelException cce)
    1.51          {
    1.52 -          Log.msg("ClosedChannelException " + cce.getMessage() + " was thrown: " 
    1.53 -            + socketChannel.socket(), false);
    1.54 +          Log.get().warning("ClosedChannelException " + cce.getMessage() + " was thrown: "
    1.55 +            + socketChannel.socket());
    1.56          }
    1.57        }
    1.58      }