aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/TranscodingThrottler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback/TranscodingThrottler.cs')
-rw-r--r--MediaBrowser.Api/Playback/TranscodingThrottler.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/MediaBrowser.Api/Playback/TranscodingThrottler.cs b/MediaBrowser.Api/Playback/TranscodingThrottler.cs
index c42d0c3e4..5852852f6 100644
--- a/MediaBrowser.Api/Playback/TranscodingThrottler.cs
+++ b/MediaBrowser.Api/Playback/TranscodingThrottler.cs
@@ -1,9 +1,9 @@
using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Configuration;
-using MediaBrowser.Model.Logging;
using System;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Threading;
+using Microsoft.Extensions.Logging;
namespace MediaBrowser.Api.Playback
{
@@ -60,7 +60,7 @@ namespace MediaBrowser.Api.Playback
{
if (!_isPaused)
{
- _logger.Debug("Sending pause command to ffmpeg");
+ _logger.LogDebug("Sending pause command to ffmpeg");
try
{
@@ -69,7 +69,7 @@ namespace MediaBrowser.Api.Playback
}
catch (Exception ex)
{
- _logger.ErrorException("Error pausing transcoding", ex);
+ _logger.LogError(ex, "Error pausing transcoding");
}
}
}
@@ -78,7 +78,7 @@ namespace MediaBrowser.Api.Playback
{
if (_isPaused)
{
- _logger.Debug("Sending unpause command to ffmpeg");
+ _logger.LogDebug("Sending resume command to ffmpeg");
try
{
@@ -87,7 +87,7 @@ namespace MediaBrowser.Api.Playback
}
catch (Exception ex)
{
- _logger.ErrorException("Error unpausing transcoding", ex);
+ _logger.LogError(ex, "Error resuming transcoding");
}
}
}
@@ -110,11 +110,11 @@ namespace MediaBrowser.Api.Playback
if (gap < targetGap)
{
- //_logger.Debug("Not throttling transcoder gap {0} target gap {1}", gap, targetGap);
+ _logger.LogDebug("Not throttling transcoder gap {0} target gap {1}", gap, targetGap);
return false;
}
- //_logger.Debug("Throttling transcoder gap {0} target gap {1}", gap, targetGap);
+ _logger.LogDebug("Throttling transcoder gap {0} target gap {1}", gap, targetGap);
return true;
}
@@ -135,21 +135,21 @@ namespace MediaBrowser.Api.Playback
if (gap < targetGap)
{
- //_logger.Debug("Not throttling transcoder gap {0} target gap {1} bytes downloaded {2}", gap, targetGap, bytesDownloaded);
+ _logger.LogDebug("Not throttling transcoder gap {0} target gap {1} bytes downloaded {2}", gap, targetGap, bytesDownloaded);
return false;
}
- //_logger.Debug("Throttling transcoder gap {0} target gap {1} bytes downloaded {2}", gap, targetGap, bytesDownloaded);
+ _logger.LogDebug("Throttling transcoder gap {0} target gap {1} bytes downloaded {2}", gap, targetGap, bytesDownloaded);
return true;
}
- catch
+ catch (Exception ex)
{
- //_logger.Error("Error getting output size");
+ _logger.LogError(ex, "Error getting output size");
return false;
}
}
- //_logger.Debug("No throttle data for " + path);
+ _logger.LogDebug("No throttle data for " + path);
return false;
}