mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-02 04:12:53 +01:00
Fix exception logging
This commit is contained in:
@@ -1414,7 +1414,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError("Error refreshing owned items for {0}", ex, Path ?? Name);
|
||||
Logger.LogError(ex, "Error refreshing owned items for {path}", Path ?? Name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError("Error loading library options", ex);
|
||||
Logger.LogError(ex, "Error loading library options");
|
||||
|
||||
return new LibraryOptions();
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
var id = child.Id;
|
||||
if (dictionary.ContainsKey(id))
|
||||
{
|
||||
Logger.LogError("Found folder containing items with duplicate id. Path: {0}, Child Name: {1}",
|
||||
Logger.LogError("Found folder containing items with duplicate id. Path: {path}, Child Name: {ChildName}",
|
||||
Path ?? Name,
|
||||
child.Path ?? child.Name);
|
||||
}
|
||||
|
||||
@@ -259,10 +259,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return _libraryManager.GetGenre(i);
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Full exception logged at lower levels
|
||||
_logger.LogError("Error getting genre");
|
||||
_logger.LogError(ex, "Error getting genre");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -383,10 +382,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return _libraryManager.GetGenre(i);
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Full exception logged at lower levels
|
||||
_logger.LogError("Error getting genre");
|
||||
_logger.LogError(ex, "Error getting genre");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user