[tasque/viewmodel: 24/78] Add Debug and Trace init logic



commit 6db312b7e254858b2b3d2d037980c88722fcc4ce
Author: Antonius Riha <antoniusriha gmail com>
Date:   Sat Jul 28 16:20:56 2012 +0200

    Add Debug and Trace init logic

 src/tasque/Program.cs |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/tasque/Program.cs b/src/tasque/Program.cs
index a80827b..ba149d4 100644
--- a/src/tasque/Program.cs
+++ b/src/tasque/Program.cs
@@ -42,6 +42,15 @@ namespace Tasque
 			return app;
 		}
 		
+		static void SetupDebugAndTrace ()
+		{
+			var consoleTraceListener = new ConsoleTraceListener ();
+			Debug.Listeners.Add (consoleTraceListener);
+			Debug.AutoFlush = true;
+			Trace.Listeners.Add (consoleTraceListener);
+			Trace.AutoFlush = true;
+		}
+		
 		static void Main (string[] args)
 		{
 			try {
@@ -52,6 +61,8 @@ namespace Tasque
 					application = CreateApplication ();
 				}
 				
+				SetupDebugAndTrace ();
+				
 				application.Initialize (args);
 				application.StartMainLoop ();
 			} catch (Exception e) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]