From ab1065a567151fd45fcf4698cd7d18708b94e35f Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Thu, 21 Feb 2013 15:26:35 -0500 Subject: removed static logger --- MediaBrowser.Common/Serialization/XmlSerializer.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'MediaBrowser.Common/Serialization/XmlSerializer.cs') diff --git a/MediaBrowser.Common/Serialization/XmlSerializer.cs b/MediaBrowser.Common/Serialization/XmlSerializer.cs index 8737aa818..c1258b72e 100644 --- a/MediaBrowser.Common/Serialization/XmlSerializer.cs +++ b/MediaBrowser.Common/Serialization/XmlSerializer.cs @@ -3,6 +3,7 @@ using System; using System.IO; using System.Linq; using System.Xml; +using MediaBrowser.Model.Logging; namespace MediaBrowser.Common.Serialization { @@ -157,10 +158,11 @@ namespace MediaBrowser.Common.Serialization /// /// The type. /// The path. + /// The logger. /// System.Object. - public static object GetXmlConfiguration(Type type, string path) + public static object GetXmlConfiguration(Type type, string path, ILogger logger) { - Logger.LogInfo("Loading {0} at {1}", type.Name, path); + logger.Info("Loading {0} at {1}", type.Name, path); object configuration; @@ -184,7 +186,7 @@ namespace MediaBrowser.Common.Serialization // If the file didn't exist before, or if something has changed, re-save if (buffer == null || !buffer.SequenceEqual(newBytes)) { - Logger.LogInfo("Saving {0} to {1}", type.Name, path); + logger.Info("Saving {0} to {1}", type.Name, path); // Save it after load in case we got new items File.WriteAllBytes(path, newBytes); @@ -200,11 +202,12 @@ namespace MediaBrowser.Common.Serialization /// /// /// The path. + /// The logger. /// ``0. - public static T GetXmlConfiguration(string path) + public static T GetXmlConfiguration(string path, ILogger logger) where T : class { - return GetXmlConfiguration(typeof(T), path) as T; + return GetXmlConfiguration(typeof(T), path, logger) as T; } } } -- cgit v1.2.3