mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-05-10 02:06:42 +08:00
write error log to Event
This commit is contained in:
@@ -148,6 +148,12 @@ namespace QuickLook
|
||||
Debug.WriteLine(e.SourceException.ToString());
|
||||
Debug.WriteLine(e.SourceException.StackTrace);
|
||||
|
||||
const string source = "QuickLook Preview Error";
|
||||
if (!EventLog.SourceExists(source))
|
||||
EventLog.CreateEventSource(source, "Application");
|
||||
EventLog.WriteEntry(source, e.SourceException.ToString(),
|
||||
EventLogEntryType.Error);
|
||||
|
||||
if (plugin != PluginManager.GetInstance().DefaultPlugin.GetType())
|
||||
BeginShowNewWindow(path, PluginManager.GetInstance().DefaultPlugin);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user