--- experimental/server/XMLReader/UDPReader.java 2000/11/21 09:38:27 1.7 +++ experimental/server/XMLReader/UDPReader.java 2000/11/21 10:11:21 1.8 @@ -26,16 +26,15 @@ public class UDPReader extends Thread{ socket = new DatagramSocket(port); } catch (BindException e){ - System.out.println("Some other process is already listening on port "+port+"."); - System.out.println("Please specify another port number on the command line."); + logger.write(this.toString(), Logger.SYSMSG, "Could not start the UDPReader thread on port "+port+" as this port was already in use."); return; } catch (Exception e){ - System.out.println("An exception occured while creating the DatagramSocket."); + logger.write(this.toString(), Logger.SYSMSG, "Could not start the UDPReader thread on port "+port+"."); return; } - System.out.println("UDPReader ready and listening for UDP packets on port "+port); + logger.write(this.toString(), Logger.SYSMSG, "UDPReader thread ready and listening for UDP packets on port "+port); byte[] buf; @@ -50,8 +49,8 @@ public class UDPReader extends Thread{ t.run(packet); } catch (IOException e) { - System.out.println("An exception occured in the UDPReader!"); - e.printStackTrace(); + logger.write(this.toString(), Logger.SYSMSG, "The UDPReader thread has been shut down as an exception occured: "+e); + return; } } socket.close();