removed static logger

This commit is contained in:
LukePulverenti
2013-02-21 15:26:35 -05:00
parent 4019b9260b
commit ab1065a567
46 changed files with 424 additions and 211 deletions

View File

@@ -16,6 +16,7 @@ using System.Runtime.Serialization;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.Controller.Entities
{
@@ -93,6 +94,11 @@ namespace MediaBrowser.Controller.Entities
/// <value>The date modified.</value>
public DateTime DateModified { get; set; }
/// <summary>
/// The logger
/// </summary>
protected static ILogger Logger = LogManager.GetLogger("BaseItem");
/// <summary>
/// Returns a <see cref="System.String" /> that represents this instance.
/// </summary>
@@ -268,7 +274,7 @@ namespace MediaBrowser.Controller.Entities
}
catch (IOException ex)
{
Logger.LogException("Error creating resolve args for ", ex, Path);
Logger.ErrorException("Error creating resolve args for ", ex, Path);
throw;
}
@@ -581,7 +587,7 @@ namespace MediaBrowser.Controller.Entities
}
catch (IOException ex)
{
Logger.LogException("Error getting ResolveArgs for {0}", ex, Path);
Logger.ErrorException("Error getting ResolveArgs for {0}", ex, Path);
return new List<Video> { };
}
@@ -606,7 +612,7 @@ namespace MediaBrowser.Controller.Entities
}
catch (IOException ex)
{
Logger.LogException("Error loading trailers for {0}", ex, Name);
Logger.ErrorException("Error loading trailers for {0}", ex, Name);
return new List<Video> { };
}
@@ -975,7 +981,7 @@ namespace MediaBrowser.Controller.Entities
var changed = copy.DateModified != DateModified;
if (changed)
{
Logger.LogDebugInfo(Name + " changed - original creation: " + DateCreated + " new creation: " + copy.DateCreated + " original modified: " + DateModified + " new modified: " + copy.DateModified);
Logger.Debug(Name + " changed - original creation: " + DateCreated + " new creation: " + copy.DateCreated + " original modified: " + DateModified + " new modified: " + copy.DateModified);
}
return changed;
}