diff options
Diffstat (limited to 'CSharp/Ivy/IvyDaemon')
-rw-r--r-- | CSharp/Ivy/IvyDaemon/IvyDaemon.cs | 16 |
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 |