diff options
Diffstat (limited to 'Emby.Server.Implementations/Library')
9 files changed, 31 insertions, 32 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index e1a725c93..451f16bef 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -384,7 +384,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error deleting {0}", ex, metadataPath); + _logger.LogError(ex, "Error deleting {metadataPath}", metadataPath); } } @@ -398,14 +398,13 @@ namespace Emby.Server.Implementations.Library { try { + _logger.LogDebug("Deleting path {path}", fileSystemInfo.FullName); if (fileSystemInfo.IsDirectory) { - _logger.LogDebug("Deleting path {0}", fileSystemInfo.FullName); _fileSystem.DeleteDirectory(fileSystemInfo.FullName, true); } else { - _logger.LogDebug("Deleting path {0}", fileSystemInfo.FullName); _fileSystem.DeleteFile(fileSystemInfo.FullName); } } @@ -489,7 +488,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error in {0} resolving {1}", ex, resolver.GetType().Name, args.Path); + _logger.LogError(ex, "Error in {resolver} resolving {path}", resolver.GetType().Name, args.Path); return null; } } @@ -587,7 +586,7 @@ namespace Emby.Server.Implementations.Library { if (parent != null && parent.IsPhysicalRoot) { - _logger.LogError("Error in GetFilteredFileSystemEntries isPhysicalRoot: {0} IsVf: {1}", ex, isPhysicalRoot, isVf); + _logger.LogError(ex, "Error in GetFilteredFileSystemEntries isPhysicalRoot: {0} IsVf: {1}", isPhysicalRoot, isVf); files = new FileSystemMetadata[] { }; } @@ -713,7 +712,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error resolving path {0}", ex, f.FullName); + _logger.LogError(ex, "Error resolving path {path}", f.FullName); return null; } }).Where(i => i != null); @@ -1148,7 +1147,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error running postscan task", ex); + _logger.LogError(ex, "Error running postscan task"); } numComplete++; @@ -1199,7 +1198,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error resolving shortcut file {0}", ex, i); + _logger.LogError(ex, "Error resolving shortcut file {file}", i); return null; } }) @@ -1650,7 +1649,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error getting intros", ex); + _logger.LogError(ex, "Error getting intros"); return new List<IntroInfo>(); } @@ -1670,7 +1669,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error getting intro files", ex); + _logger.LogError(ex, "Error getting intro files"); return new List<string>(); } @@ -1693,7 +1692,7 @@ namespace Emby.Server.Implementations.Library if (video == null) { - _logger.LogError("Unable to locate item with Id {0}.", info.ItemId.Value); + _logger.LogError("Unable to locate item with Id {ID}.", info.ItemId.Value); } } else if (!string.IsNullOrEmpty(info.Path)) @@ -1705,7 +1704,7 @@ namespace Emby.Server.Implementations.Library if (video == null) { - _logger.LogError("Intro resolver returned null for {0}.", info.Path); + _logger.LogError("Intro resolver returned null for {path}.", info.Path); } else { @@ -1724,7 +1723,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error resolving path {0}.", ex, info.Path); + _logger.LogError(ex, "Error resolving path {path}.", info.Path); } } else @@ -1873,7 +1872,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error in ItemAdded event handler", ex); + _logger.LogError(ex, "Error in ItemAdded event handler"); } } } @@ -1929,7 +1928,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error in ItemUpdated event handler", ex); + _logger.LogError(ex, "Error in ItemUpdated event handler"); } } } @@ -1965,7 +1964,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error in ItemRemoved event handler", ex); + _logger.LogError(ex, "Error in ItemRemoved event handler"); } } } @@ -2808,7 +2807,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error getting person", ex); + _logger.LogError(ex, "Error getting person"); return null; } diff --git a/Emby.Server.Implementations/Library/MediaSourceManager.cs b/Emby.Server.Implementations/Library/MediaSourceManager.cs index 15673d25d..e5fd28997 100644 --- a/Emby.Server.Implementations/Library/MediaSourceManager.cs +++ b/Emby.Server.Implementations/Library/MediaSourceManager.cs @@ -256,7 +256,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error getting media sources", ex); + _logger.LogError(ex, "Error getting media sources"); return new List<MediaSourceInfo>(); } } @@ -477,7 +477,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error probing live tv stream", ex); + _logger.LogError(ex, "Error probing live tv stream"); AddMediaInfo(mediaSource, isAudio); } diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 35b0ca304..ae3577b7d 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -392,7 +392,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error authenticating with provider {0}", ex, provider.Name); + _logger.LogError(ex, "Error authenticating with provider {provider}", provider.Name); return false; } @@ -575,7 +575,7 @@ namespace Emby.Server.Implementations.Library catch (Exception ex) { // Have to use a catch-all unfortunately because some .net image methods throw plain Exceptions - _logger.LogError("Error generating PrimaryImageAspectRatio for {0}", ex, user.Name); + _logger.LogError(ex, "Error generating PrimaryImageAspectRatio for {user}", user.Name); } } @@ -599,7 +599,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error getting {0} image info for {1}", ex, image.Type, image.Path); + _logger.LogError(ex, "Error getting {imageType} image info for {imagePath}", image.Type, image.Path); return null; } } @@ -775,7 +775,7 @@ namespace Emby.Server.Implementations.Library } catch (IOException ex) { - _logger.LogError("Error deleting file {0}", ex, configPath); + _logger.LogError(ex, "Error deleting file {path}", configPath); } DeleteUserPolicy(user); @@ -1045,7 +1045,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error reading policy file: {0}", ex, path); + _logger.LogError(ex, "Error reading policy file: {path}", path); return GetDefaultPolicy(user); } @@ -1109,7 +1109,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error deleting policy file", ex); + _logger.LogError(ex, "Error deleting policy file"); } } @@ -1144,7 +1144,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.LogError("Error reading policy file: {0}", ex, path); + _logger.LogError(ex, "Error reading policy file: {path}", path); return new UserConfiguration(); } diff --git a/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs index 593a9a1ef..1686dc23c 100644 --- a/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs @@ -70,7 +70,7 @@ namespace Emby.Server.Implementations.Library.Validators } catch (Exception ex) { - _logger.LogError("Error refreshing {0}", ex, name); + _logger.LogError(ex, "Error refreshing {ArtistName}", name); } numComplete++; diff --git a/Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs b/Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs index ffa5608dd..070777475 100644 --- a/Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs @@ -57,7 +57,7 @@ namespace Emby.Server.Implementations.Library.Validators } catch (Exception ex) { - _logger.LogError("Error refreshing {0}", ex, name); + _logger.LogError(ex, "Error refreshing {GenreName}", name); } numComplete++; diff --git a/Emby.Server.Implementations/Library/Validators/GenresValidator.cs b/Emby.Server.Implementations/Library/Validators/GenresValidator.cs index e59b747de..775cde299 100644 --- a/Emby.Server.Implementations/Library/Validators/GenresValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/GenresValidator.cs @@ -58,7 +58,7 @@ namespace Emby.Server.Implementations.Library.Validators } catch (Exception ex) { - _logger.LogError("Error refreshing {0}", ex, name); + _logger.LogError(ex, "Error refreshing {GenreName}", name); } numComplete++; diff --git a/Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs b/Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs index ec8568afc..b5ed1c0e6 100644 --- a/Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs @@ -58,7 +58,7 @@ namespace Emby.Server.Implementations.Library.Validators } catch (Exception ex) { - _logger.LogError("Error refreshing {0}", ex, name); + _logger.LogError(ex, "Error refreshing {GenreName}", name); } numComplete++; diff --git a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs index 80e396583..50c7cfbc6 100644 --- a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs @@ -78,7 +78,7 @@ namespace Emby.Server.Implementations.Library.Validators } catch (Exception ex) { - _logger.LogError("Error validating IBN entry {0}", ex, person); + _logger.LogError(ex, "Error validating IBN entry {person}", person); } // Update progress diff --git a/Emby.Server.Implementations/Library/Validators/StudiosValidator.cs b/Emby.Server.Implementations/Library/Validators/StudiosValidator.cs index fec989032..1a5ebac54 100644 --- a/Emby.Server.Implementations/Library/Validators/StudiosValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/StudiosValidator.cs @@ -57,7 +57,7 @@ namespace Emby.Server.Implementations.Library.Validators } catch (Exception ex) { - _logger.LogError("Error refreshing {0}", ex, name); + _logger.LogError(ex, "Error refreshing {StudioName}", name); } numComplete++; |
