summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Helpers
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-03-26 19:27:11 +0000
committersr55 <[email protected]>2016-03-26 19:27:11 +0000
commit6685f23b8aeb8afd98103500a8cfebc0c3b9c1ea (patch)
tree14507d75c49c4f1a97f18c331e88998aeaa38e2b /win/CS/HandBrakeWPF/Helpers
parent1c64294301cb511a1e088750f810121c4661aabc (diff)
WinGui: Fix a couple of silent errors with the new logging system.
Diffstat (limited to 'win/CS/HandBrakeWPF/Helpers')
-rw-r--r--win/CS/HandBrakeWPF/Helpers/LogManager.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/LogManager.cs b/win/CS/HandBrakeWPF/Helpers/LogManager.cs
index 4e883f8ee..70347fca1 100644
--- a/win/CS/HandBrakeWPF/Helpers/LogManager.cs
+++ b/win/CS/HandBrakeWPF/Helpers/LogManager.cs
@@ -31,6 +31,11 @@ namespace HandBrakeWPF.Helpers
ILog log = LogService.GetLogger();
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
string logFile = Path.Combine(logDir, string.Format("activity_log{0}.txt", GeneralUtilities.ProcessId));
+ if (!Directory.Exists(Path.GetDirectoryName(logFile)))
+ {
+ Directory.CreateDirectory(Path.GetDirectoryName(logFile));
+ }
+
log.Enable();
log.SetupLogHeader(GeneralUtilities.CreateLogHeader().ToString());
log.EnableLoggingToDisk(logFile, true);