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

@@ -141,7 +141,7 @@ namespace Emby.Server.Implementations.IO
}
catch (Exception ex)
{
Logger.LogError("Error processing directory changes", ex);
Logger.LogError(ex, "Error processing directory changes");
}
}
@@ -161,7 +161,7 @@ namespace Emby.Server.Implementations.IO
continue;
}
Logger.LogInformation(item.Name + " (" + item.Path + ") will be refreshed.");
Logger.LogInformation("{name} ({path}}) will be refreshed.", item.Name, item.Path);
try
{
@@ -172,11 +172,11 @@ namespace Emby.Server.Implementations.IO
// For now swallow and log.
// Research item: If an IOException occurs, the item may be in a disconnected state (media unavailable)
// Should we remove it from it's parent?
Logger.LogError("Error refreshing {0}", ex, item.Name);
Logger.LogError(ex, "Error refreshing {name}", item.Name);
}
catch (Exception ex)
{
Logger.LogError("Error refreshing {0}", ex, item.Name);
Logger.LogError(ex, "Error refreshing {name}", item.Name);
}
}
}