From 76f067f86778c29fbfb3716a72bc858cfdd73fd8 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Thu, 21 Feb 2013 16:06:23 -0500 Subject: extracted more logging dependancies --- MediaBrowser.Controller/IO/FileData.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'MediaBrowser.Controller/IO/FileData.cs') diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs index b94034913..3ccf8add6 100644 --- a/MediaBrowser.Controller/IO/FileData.cs +++ b/MediaBrowser.Controller/IO/FileData.cs @@ -15,15 +15,11 @@ namespace MediaBrowser.Controller.IO /// public static class FileData { - /// - /// The logger - /// - private static readonly ILogger Logger = LogManager.GetLogger("FileData"); - /// /// Gets all file system entries within a foler /// /// The path. + /// The logger. /// The search pattern. /// if set to true [include files]. /// if set to true [include directories]. @@ -32,7 +28,7 @@ namespace MediaBrowser.Controller.IO /// Dictionary{System.StringWIN32_FIND_DATA}. /// /// GetFileSystemEntries failed - public static Dictionary GetFilteredFileSystemEntries(string path, string searchPattern = "*", bool includeFiles = true, bool includeDirectories = true, int flattenFolderDepth = 0, ItemResolveArgs args = null) + public static Dictionary GetFilteredFileSystemEntries(string path, ILogger logger, string searchPattern = "*", bool includeFiles = true, bool includeDirectories = true, int flattenFolderDepth = 0, ItemResolveArgs args = null) { if (string.IsNullOrEmpty(path)) { @@ -93,7 +89,7 @@ namespace MediaBrowser.Controller.IO if (string.IsNullOrWhiteSpace(newPath)) { //invalid shortcut - could be old or target could just be unavailable - Logger.Warn("Encountered invalid shortuct: "+lpFindFileData.Path); + logger.Warn("Encountered invalid shortuct: " + lpFindFileData.Path); continue; } var data = FileSystem.GetFileData(newPath); @@ -117,7 +113,7 @@ namespace MediaBrowser.Controller.IO } else if (flattenFolderDepth > 0 && lpFindFileData.IsDirectory) { - foreach (var child in GetFilteredFileSystemEntries(lpFindFileData.Path, flattenFolderDepth: flattenFolderDepth - 1)) + foreach (var child in GetFilteredFileSystemEntries(lpFindFileData.Path, logger, flattenFolderDepth: flattenFolderDepth - 1)) { dict[child.Key] = child.Value; } -- cgit v1.2.3