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/Library/Profiler.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/Library/Profiler.cs') diff --git a/MediaBrowser.Controller/Library/Profiler.cs b/MediaBrowser.Controller/Library/Profiler.cs index 4daa9d654..3ac53f62a 100644 --- a/MediaBrowser.Controller/Library/Profiler.cs +++ b/MediaBrowser.Controller/Library/Profiler.cs @@ -1,6 +1,7 @@ using System; using System.Diagnostics; using MediaBrowser.Common.Logging; +using MediaBrowser.Model.Logging; namespace MediaBrowser.Controller.Library { @@ -18,14 +19,22 @@ namespace MediaBrowser.Controller.Library /// readonly Stopwatch stopwatch; + /// + /// The _logger + /// + private ILogger _logger; + /// /// Initializes a new instance of the class. /// /// The name. - public Profiler(string name) + /// The logger. + public Profiler(string name, ILogger logger) { this.name = name; + _logger = logger; + stopwatch = new Stopwatch(); stopwatch.Start(); } @@ -60,7 +69,7 @@ namespace MediaBrowser.Controller.Library message = string.Format("{0} took {1} seconds.", name, ((float)stopwatch.ElapsedMilliseconds / 1000).ToString("#0.000")); } - Logger.LogInfo(message); + _logger.Info(message); } } -- cgit v1.2.3