From f50348ca0b03a7928e58eb3b188532b98d6f46fa Mon Sep 17 00:00:00 2001 From: "E.Smith" <31170571+azlm8t@users.noreply.github.com> Date: Sun, 19 Jul 2020 12:59:28 +0100 Subject: [PATCH] Log path on lookup errors If the lookup fails (due to a bad id in an nfo file for example), then we had no indication of which directory failed, so the user can not fix the problem. Now we include the path in the error message such as: MediaBrowser.Providers.TV.SeriesMetadataService: Error in DummySeasonProvider for /media/x/y/z and MediaBrowser.Providers.Manager.ProviderManager: TvdbSeriesImageProvider failed in GetImageInfos for type Series at /media/x/y/z --- MediaBrowser.Providers/Manager/ProviderManager.cs | 4 ++-- MediaBrowser.Providers/TV/SeriesMetadataService.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs index 4ee065cd1..9170c7002 100644 --- a/MediaBrowser.Providers/Manager/ProviderManager.cs +++ b/MediaBrowser.Providers/Manager/ProviderManager.cs @@ -265,7 +265,7 @@ namespace MediaBrowser.Providers.Manager } catch (Exception ex) { - _logger.LogError(ex, "{0} failed in GetImageInfos for type {1}", provider.GetType().Name, item.GetType().Name); + _logger.LogError(ex, "{ProviderName} failed in GetImageInfos for type {ItemType} at {ItemPath}", provider.GetType().Name, item.GetType().Name, item.Path); return new List(); } } @@ -430,7 +430,7 @@ namespace MediaBrowser.Providers.Manager } catch (Exception ex) { - _logger.LogError(ex, "{0} failed in Supports for type {1}", provider.GetType().Name, item.GetType().Name); + _logger.LogError(ex, "{ProviderName} failed in Supports for type {ItemType} at {ItemPath}", provider.GetType().Name, item.GetType().Name, item.Path); return false; } } diff --git a/MediaBrowser.Providers/TV/SeriesMetadataService.cs b/MediaBrowser.Providers/TV/SeriesMetadataService.cs index 4181d37ef..a2c0e62c1 100644 --- a/MediaBrowser.Providers/TV/SeriesMetadataService.cs +++ b/MediaBrowser.Providers/TV/SeriesMetadataService.cs @@ -58,7 +58,7 @@ namespace MediaBrowser.Providers.TV } catch (Exception ex) { - Logger.LogError(ex, "Error in DummySeasonProvider"); + Logger.LogError(ex, "Error in DummySeasonProvider for {ItemPath}", item.Path); } }