aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Localization/LocalizedStrings.cs
diff options
context:
space:
mode:
authorLukePulverenti <luke.pulverenti@gmail.com>2013-02-21 15:26:35 -0500
committerLukePulverenti <luke.pulverenti@gmail.com>2013-02-21 15:26:55 -0500
commitab1065a567151fd45fcf4698cd7d18708b94e35f (patch)
tree1863297fbd2966ceea85bc2a6c1991c5bab2c589 /MediaBrowser.Controller/Localization/LocalizedStrings.cs
parent4019b9260bc1bcf23adb856cbd2b9857575fd08f (diff)
removed static logger
Diffstat (limited to 'MediaBrowser.Controller/Localization/LocalizedStrings.cs')
-rw-r--r--MediaBrowser.Controller/Localization/LocalizedStrings.cs13
1 files changed, 9 insertions, 4 deletions
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;
@@ -16,6 +17,10 @@ namespace MediaBrowser.Controller.Localization
public class LocalizedStrings
{
/// <summary>
+ /// The logger
+ /// </summary>
+ private static readonly ILogger Logger = LogManager.GetLogger("LocalizedStrings");
+ /// <summary>
/// The base prefix
/// </summary>
public const string BasePrefix = "base-";
@@ -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;
}