 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.


Delivered-To: urba-cgu@urbanet.ch 
From: Mark Douglas <Mark_Douglas@systemsunion.com> 
To: "'cgu@urbanet.ch'" <cgu@urbanet.ch> 
Subject: Enhanced SocketServer and SocketNode classes 
Date: Wed, 17 Jan 2001 09:57:38 -0000 
X-Mailer: Internet Mail Service (5.5.2650.21) 


Hi Ceki,


I have made small changes to SocketServer and SockerNode to allow the client
machine name to be displayed in the logging output.  This is important for
us as we are using a single logging server with several clients.


The new SocketServer2 and SocketNode2 classes (couldn't think of better
names) prepends the NDC string with the clients Host Name (or IP address if
the HostName can not be found).  I thought the NDC string was a good place
to add this information, but you may have a better place?


I have created an NDC entry for the server such that server logging messages
can easily be identified.


I have included the two new source files plus a short example of the output.


The output was generated with the following layout: %-6p (%9x:%-10t)
%-40c{3} - %m%n


 <<Log.txt>>  <<SocketNode2.java>>  <<SocketServer2.java>> 


Note: I have changed the package names for the two classes to fit with our
package names - sorry.  Also, I find it difficult to follow the coding
style, so again, sorry.


If you think this may be useful to others, please feel free to include it as
an addition in the next release or change the current SocketServer and
SocketNode objects to include this new behaviour by default.


Mark Douglas
Systems Union Group plc


