Fix exception logging

This commit is contained in:
Bond_009
2018-12-20 13:11:26 +01:00
parent bf01918659
commit ea4c914123
123 changed files with 565 additions and 607 deletions

View File

@@ -69,7 +69,7 @@ namespace MediaBrowser.Api.Playback
}
catch (Exception ex)
{
_logger.LogError("Error pausing transcoding", ex);
_logger.LogError(ex, "Error pausing transcoding");
}
}
}
@@ -78,7 +78,7 @@ namespace MediaBrowser.Api.Playback
{
if (_isPaused)
{
_logger.LogDebug("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.LogError("Error unpausing transcoding", ex);
_logger.LogError(ex, "Error resuming transcoding");
}
}
}
@@ -110,11 +110,11 @@ namespace MediaBrowser.Api.Playback
if (gap < targetGap)
{
//_logger.LogDebug("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.LogDebug("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.LogDebug("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.LogDebug("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.LogError("Error getting output size");
_logger.LogError(ex, "Error getting output size");
return false;
}
}
//_logger.LogDebug("No throttle data for " + path);
_logger.LogDebug("No throttle data for " + path);
return false;
}