aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/Profiler.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/Library/Profiler.cs
parent4019b9260bc1bcf23adb856cbd2b9857575fd08f (diff)
removed static logger
Diffstat (limited to 'MediaBrowser.Controller/Library/Profiler.cs')
-rw-r--r--MediaBrowser.Controller/Library/Profiler.cs13
1 files changed, 11 insertions, 2 deletions
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
{
@@ -19,13 +20,21 @@ namespace MediaBrowser.Controller.Library
readonly Stopwatch stopwatch;
/// <summary>
+ /// The _logger
+ /// </summary>
+ private ILogger _logger;
+
+ /// <summary>
/// Initializes a new instance of the <see cref="Profiler" /> class.
/// </summary>
/// <param name="name">The name.</param>
- public Profiler(string name)
+ /// <param name="logger">The logger.</param>
+ 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);
}
}