diff options
| author | Bond_009 <bond.009@outlook.com> | 2018-12-30 22:49:09 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2018-12-30 22:49:09 +0100 |
| commit | 4c95aee52eda793d1e013164cc0fde9eb609f894 (patch) | |
| tree | c2bdc577721613ad20c7159b5dd7605eebd46c43 | |
| parent | bbe2ca412b215e4d0b7ac6744e004c448fc80854 (diff) | |
Fix logging in XmlTvListingsProvider
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs index a8609ce2d..4d7c7fef4 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs @@ -15,7 +15,7 @@ using MediaBrowser.Controller.LiveTv; using MediaBrowser.Model.Dto; using MediaBrowser.Model.IO; using MediaBrowser.Model.LiveTv; -using MediaBrowser.Model.Logging; +using Microsoft.Extensions.Logging; namespace Jellyfin.Server.Implementations.LiveTv.Listings { @@ -58,7 +58,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings private async Task<string> GetXml(string path, CancellationToken cancellationToken) { - _logger.Info("xmltv path: {0}", path); + _logger.LogInformation("xmltv path: {path}", path); if (!path.StartsWith("http", StringComparison.OrdinalIgnoreCase)) { @@ -72,7 +72,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings return UnzipIfNeeded(path, cacheFile); } - _logger.Info("Downloading xmltv listings from {0}", path); + _logger.LogInformation("Downloading xmltv listings from {path}", path); string tempFile = await _httpClient.GetTempFile(new HttpRequestOptions { @@ -109,7 +109,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings } catch (Exception ex) { - _logger.ErrorException("Error extracting from gz file {0}", ex, file); + _logger.LogError(ex, "Error extracting from gz file {file}", file); } try @@ -119,7 +119,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings } catch (Exception ex) { - _logger.ErrorException("Error extracting from zip file {0}", ex, file); + _logger.LogError(ex, "Error extracting from zip file {file}", file); } } @@ -177,10 +177,10 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings } }*/ - _logger.Debug("Getting xmltv programs for channel {0}", channelId); + _logger.LogDebug("Getting xmltv programs for channel {id}", channelId); string path = await GetXml(info.Path, cancellationToken).ConfigureAwait(false); - _logger.Debug("Opening XmlTvReader for {0}", path); + _logger.LogDebug("Opening XmlTvReader for {path}", path); var reader = new XmlTvReader(path, GetLanguage(info)); return reader.GetProgrammes(channelId, startDateUtc, endDateUtc, cancellationToken) @@ -273,7 +273,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings { // In theory this should never be called because there is always only one lineup string path = await GetXml(info.Path, CancellationToken.None).ConfigureAwait(false); - _logger.Debug("Opening XmlTvReader for {0}", path); + _logger.LogDebug("Opening XmlTvReader for {path}", path); var reader = new XmlTvReader(path, GetLanguage(info)); IEnumerable<XmlTvChannel> results = reader.GetChannels(); @@ -285,7 +285,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings { // In theory this should never be called because there is always only one lineup string path = await GetXml(info.Path, cancellationToken).ConfigureAwait(false); - _logger.Debug("Opening XmlTvReader for {0}", path); + _logger.LogDebug("Opening XmlTvReader for {path}", path); var reader = new XmlTvReader(path, GetLanguage(info)); IEnumerable<XmlTvChannel> results = reader.GetChannels(); |
