summaryrefslogtreecommitdiff
path: root/CSharp/Ivy
diff options
context:
space:
mode:
authorfcolin2007-02-01 09:53:07 +0000
committerfcolin2007-02-01 09:53:07 +0000
commit4d4b484e20394cf26270b556ce88fa52194d274f (patch)
tree79b72f5ddbccdb4d0f68a67529ed7a3d88a59045 /CSharp/Ivy
parentdc630ee5c7fedc4657bd826a6bdaf96bf7a0a167 (diff)
downloadivy-csharp-4d4b484e20394cf26270b556ce88fa52194d274f.zip
ivy-csharp-4d4b484e20394cf26270b556ce88fa52194d274f.tar.gz
ivy-csharp-4d4b484e20394cf26270b556ce88fa52194d274f.tar.bz2
ivy-csharp-4d4b484e20394cf26270b556ce88fa52194d274f.tar.xz
Utilisateur : Fcolin Date : 6/02/06 Heure : 17:12 Archivé dans $/CSharp/Ivy/IvyDaemon Commentaire: utilisation generale de traceDEbug et System.Diagnostics (vss 4)
Diffstat (limited to 'CSharp/Ivy')
-rw-r--r--CSharp/Ivy/IvyDaemon/IvyDaemon.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/CSharp/Ivy/IvyDaemon/IvyDaemon.cs b/CSharp/Ivy/IvyDaemon/IvyDaemon.cs
index c35376f..c489c98 100644
--- a/CSharp/Ivy/IvyDaemon/IvyDaemon.cs
+++ b/CSharp/Ivy/IvyDaemon/IvyDaemon.cs
@@ -11,6 +11,7 @@ namespace IvyDaemon
using System.Net;
using System.Net.Sockets;
using System.Configuration;
+ using System.Diagnostics;
using IvyBus;
/// <summary> IvyDaemon: simple TCP to Ivy relay.
/// </summary>
@@ -138,7 +139,7 @@ namespace IvyDaemon
}
public void Run()
{
- //traceDebug("Subreader Thread started");
+ traceDebug("Subreader Thread started");
String msg = null;
try
{
@@ -152,18 +153,17 @@ namespace IvyDaemon
}
catch (IOException ioe)
{
- //traceDebug("Subreader exception ...");
- Console.Error.WriteLine( ioe.StackTrace );
+ traceDebug("Subreader exception:" + ioe.Message);
System.Environment.Exit(0);
}
- //traceDebug("Subreader Thread stopped");
+ traceDebug("Subreader Thread stopped");
}
+
}
-
- private void traceDebug(System.String s)
+ [Conditional("DEBUG")]
+ private static void traceDebug(string s)
{
- if (debug)
- System.Console.Out.WriteLine("-->IvyDaemon " + bus.AppName + "<-- " + s);
+ Trace.WriteLineIf(debug, "-->IvyDaemon<-- " + s);
}
}
} \ No newline at end of file