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.Controller/Localization/LocalizedStrings.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'MediaBrowser.Controller/Localization/LocalizedStrings.cs') diff --git a/MediaBrowser.Controller/Localization/LocalizedStrings.cs b/MediaBrowser.Controller/Localization/LocalizedStrings.cs index b7e66f095..aa651e181 100644 --- a/MediaBrowser.Controller/Localization/LocalizedStrings.cs +++ b/MediaBrowser.Controller/Localization/LocalizedStrings.cs @@ -1,5 +1,6 @@ using MediaBrowser.Common.Localization; using MediaBrowser.Common.Logging; +using MediaBrowser.Model.Logging; using System; using System.Collections.Concurrent; using System.Globalization; @@ -15,6 +16,10 @@ namespace MediaBrowser.Controller.Localization /// public class LocalizedStrings { + /// + /// The logger + /// + private static readonly ILogger Logger = LogManager.GetLogger("LocalizedStrings"); /// /// The base prefix /// @@ -80,7 +85,7 @@ namespace MediaBrowser.Controller.Localization var xs = new XmlSerializer(t); var strings = (LocalizedStringData)Activator.CreateInstance(t); strings.FileName = file; - Logger.LogInfo("Using String Data from {0}", file); + Logger.Info("Using String Data from {0}", file); if (File.Exists(file)) { using (var fs = new FileStream(file, FileMode.Open, FileAccess.Read)) @@ -121,17 +126,17 @@ namespace MediaBrowser.Controller.Localization } catch (TargetException ex) { - Logger.LogException("Error getting value for field: {0}", ex, field.Name); + Logger.ErrorException("Error getting value for field: {0}", ex, field.Name); continue; } catch (FieldAccessException ex) { - Logger.LogException("Error getting value for field: {0}", ex, field.Name); + Logger.ErrorException("Error getting value for field: {0}", ex, field.Name); continue; } catch (NotSupportedException ex) { - Logger.LogException("Error getting value for field: {0}", ex, field.Name); + Logger.ErrorException("Error getting value for field: {0}", ex, field.Name); continue; } -- cgit v1.2.3