mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
set Trace listeners manually on application startup.
This commit is contained in:
parent
5d8962138b
commit
5d3ba6903b
@ -5,14 +5,7 @@
|
||||
<section name="GARbro.GUI.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<system.diagnostics>
|
||||
<trace autoflush="true">
|
||||
<listeners>
|
||||
<add type="System.Diagnostics.TextWriterTraceListener" name="TextWriter" initializeData="trace.log"/>
|
||||
</listeners>
|
||||
</trace>
|
||||
</system.diagnostics>
|
||||
<startup>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
|
||||
</startup>
|
||||
<userSettings>
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user