From 3488cfecbd54eaaf917d853664f68cac84d472e9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 29 Dec 2013 09:12:29 -0500 Subject: make lazy loaded paths more nimble --- MediaBrowser.Common.Implementations/Logging/NlogManager.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'MediaBrowser.Common.Implementations/Logging') diff --git a/MediaBrowser.Common.Implementations/Logging/NlogManager.cs b/MediaBrowser.Common.Implementations/Logging/NlogManager.cs index 56f2b5e29..fb7fd1698 100644 --- a/MediaBrowser.Common.Implementations/Logging/NlogManager.cs +++ b/MediaBrowser.Common.Implementations/Logging/NlogManager.cs @@ -186,6 +186,8 @@ namespace MediaBrowser.Common.Implementations.Logging { LogFilePath = Path.Combine(LogDirectory, LogFilePrefix + "-" + decimal.Round(DateTime.Now.Ticks / 10000000) + ".log"); + Directory.CreateDirectory(Path.GetDirectoryName(LogFilePath)); + AddFileTarget(LogFilePath, level); LogSeverity = level; -- cgit v1.2.3