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

@@ -146,7 +146,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
catch (Exception ex)
{
Logger.LogError("Error deserializing {0}", ex, path);
Logger.LogError(ex, "Error deserializing {path}", path);
}
_readFromFile = true;
}
@@ -436,7 +436,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
catch (Exception ex)
{
Logger.LogError("Error", ex);
Logger.LogError(ex, "Error");
failureException = ex;
@@ -669,7 +669,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
catch (Exception ex)
{
Logger.LogError("Error calling CancellationToken.Cancel();", ex);
Logger.LogError(ex, "Error calling CancellationToken.Cancel();");
}
}
var task = _currentTask;
@@ -691,7 +691,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
catch (Exception ex)
{
Logger.LogError("Error calling Task.WaitAll();", ex);
Logger.LogError(ex, "Error calling Task.WaitAll();");
}
}
@@ -704,7 +704,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
}
catch (Exception ex)
{
Logger.LogError("Error calling CancellationToken.Dispose();", ex);
Logger.LogError(ex, "Error calling CancellationToken.Dispose();");
}
}
if (wassRunning)