protected OnStartup ( System.Windows.StartupEventArgs e ) : void | ||
e | System.Windows.StartupEventArgs | |
return | void |
protected override void OnStartup(StartupEventArgs e)
{
Trace.AutoFlush = true;
try
{
var log = new TextWriterTraceListener(File.Create(traceFilename))
{
Filter = new EventTypeFilter(SourceLevels.Information),
TraceOutputOptions = TraceOptions.None
};
Trace.Listeners.Add(log);
}
catch (Exception ex)
{
}
this.DispatcherUnhandledException += App_DispatcherUnhandledException;
base.OnStartup(e);
}