diff options
author | fcolin | 2007-02-01 09:58:29 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 09:58:29 +0000 |
commit | 3618e77c19f54ec7fc69a22a6585e41e416dc364 (patch) | |
tree | 0368ee5743e420636f196788a16bfbd7b85aa9b6 /CSharp/Ivy/IvyPPC/IvyClient.cs | |
parent | 5542387987fa25525c648f43f2ef99f3cf2da16a (diff) | |
download | ivy-csharp-3618e77c19f54ec7fc69a22a6585e41e416dc364.zip ivy-csharp-3618e77c19f54ec7fc69a22a6585e41e416dc364.tar.gz ivy-csharp-3618e77c19f54ec7fc69a22a6585e41e416dc364.tar.bz2 ivy-csharp-3618e77c19f54ec7fc69a22a6585e41e416dc364.tar.xz |
Utilisateur : Fcolin Date : 6/02/06 Heure : 17:12 Archivé dans $/CSharp/Ivy/Ivy Commentaire: utilisation generale de traceDEbug et System.Diagnostics (vss 34)
Diffstat (limited to 'CSharp/Ivy/IvyPPC/IvyClient.cs')
-rw-r--r-- | CSharp/Ivy/IvyPPC/IvyClient.cs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyClient.cs b/CSharp/Ivy/IvyPPC/IvyClient.cs index fe70620..9b3c2f6 100644 --- a/CSharp/Ivy/IvyPPC/IvyClient.cs +++ b/CSharp/Ivy/IvyPPC/IvyClient.cs @@ -15,6 +15,7 @@ namespace IvyBus using System.Net;
using System.Net.Sockets;
using System.Configuration;
+ using System.Diagnostics;
/// <summary> A Class for the the peers on the bus.
/// </summary>
@@ -310,20 +311,19 @@ namespace IvyBus }
catch ( ObjectDisposedException e )
{
- traceDebug( "ivyclient socket closed "+e.Message );
+ traceDebug( "socket closed "+e.Message );
running = false;
break;
}
catch (IvyException ie)
{
- Console.Error.WriteLine(ie.Message);
- Console.Error.WriteLine(ie.StackTrace);
- running = false;
+ traceDebug("socket closed IvyException" + ie.Message);
+ running = false;
break;
}
catch (SocketException se)
{
- traceDebug( "ivyclient socket closed "+se.Message );
+ traceDebug( "socket closed "+se.Message );
running = false;
break;
}
@@ -331,14 +331,12 @@ namespace IvyBus {
if ( e.InnerException is SocketException )
{
- traceDebug( "ivyclient socket closed" );
+ traceDebug( "socket closed" );
}
else
{
traceDebug("abnormally Disconnected from " + RemoteAddress + ":" + RemotePort);
- Console.Error.WriteLine(e.Message);
- Console.Error.WriteLine(e.StackTrace);
}
running = false;
break;
@@ -430,7 +428,7 @@ namespace IvyBus }
catch (KeyNotFoundException ex)
{
- Console.Error.WriteLine("DelBinding " + ex.Message);
+ traceDebug("DelBinding " + ex.Message);
}
}
}
@@ -501,11 +499,11 @@ namespace IvyBus {
return "IvyClient " + bus.appName + ":" + appName;
}
-
+
+ [Conditional("DEBUG")]
private void traceDebug(String s)
{
- if (bus.VerboseDebug)
- Console.Error.WriteLine("-->IvyClient " + bus.appName + ":" + appName + "<-- " + s);
+ Trace.WriteLineIf(Ivy.VerboseDebug, "-->IvyClient " + bus.appName + ":" + appName + "<-- " + s);
}
internal bool isPinging = false;
|