From 5d3ba6903baad84e80e36d02629c9f3f6a15a383 Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 1 Aug 2014 16:38:29 +0400 Subject: [PATCH] set Trace listeners manually on application startup. --- App.config | 9 +-------- App.xaml.cs | 5 +++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/App.config b/App.config index b0d25882..cabd6c76 100644 --- a/App.config +++ b/App.config @@ -5,14 +5,7 @@
- - - - - - - - + diff --git a/App.xaml.cs b/App.xaml.cs index 0f20f349..db182dcf 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -50,6 +50,11 @@ namespace GARbro.GUI void ApplicationStartup (object sender, StartupEventArgs e) { +#if DEBUG + string trace_dir = Path.GetDirectoryName (System.Reflection.Assembly.GetExecutingAssembly().Location); + Trace.Listeners.Add (new TextWriterTraceListener (Path.Combine (trace_dir, "trace.log"))); + Trace.AutoFlush = true; +#endif Trace.WriteLine ("ApplicationStartup --------------------------------", "GARbro.GUI.App"); if (0 != e.Args.Length) {