aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 9c2e0e9d8..af56f6382 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -24,6 +24,7 @@ using MediaBrowser.Controller;
using MediaBrowser.Controller.Net;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Diagnostics;
+using Microsoft.Extensions.Logging;
namespace MediaBrowser.Api.Playback
{
@@ -248,7 +249,7 @@ namespace MediaBrowser.Api.Playback
cancellationTokenSource);
var commandLineLogMessage = process.StartInfo.FileName + " " + process.StartInfo.Arguments;
- Logger.Info(commandLineLogMessage);
+ Logger.LogInformation(commandLineLogMessage);
var logFilePrefix = "ffmpeg-transcode";
if (state.VideoRequest != null && string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase) && string.Equals(state.OutputAudioCodec, "copy", StringComparison.OrdinalIgnoreCase))
@@ -277,7 +278,7 @@ namespace MediaBrowser.Api.Playback
}
catch (Exception ex)
{
- Logger.ErrorException("Error starting ffmpeg", ex);
+ Logger.LogError(ex, "Error starting ffmpeg");
ApiEntryPoint.Instance.OnTranscodeFailedToStart(outputPath, TranscodingJobType, state);
@@ -351,16 +352,16 @@ namespace MediaBrowser.Api.Playback
job.HasExited = true;
}
- Logger.Debug("Disposing stream resources");
+ Logger.LogDebug("Disposing stream resources");
state.Dispose();
try
{
- Logger.Info("FFMpeg exited with code {0}", process.ExitCode);
+ Logger.LogInformation("FFMpeg exited with code {0}", process.ExitCode);
}
catch
{
- Logger.Error("FFMpeg exited with an error.");
+ Logger.LogError("FFMpeg exited with an error.");
}
// This causes on exited to be called twice:
@@ -371,7 +372,7 @@ namespace MediaBrowser.Api.Playback
//}
//catch (Exception ex)
//{
- // Logger.ErrorException("Error disposing ffmpeg.", ex);
+ // Logger.LogError(ex, "Error disposing ffmpeg.");
//}
}