diff --git a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs index ee31c5fb4..34f9e5b52 100644 --- a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs +++ b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs @@ -12,7 +12,7 @@ namespace NzbDrone.Common.Instrumentation { public static class NzbDroneLogger { - private const string FILE_LOG_LAYOUT = @"${date:format=yyyy-MM-dd HH\:mm\:ss.f}|${level}|${logger}|${message}${onexception:inner=${newline}${newline}[v${assembly-version}] ${exception:format=ToString}${newline}${exception:format=Data}${newline}}"; + private const string FILE_LOG_LAYOUT = @"${date:format=yyyy-MM-dd HH\:mm\:ss.fff}|${level}|${logger}|${message}${onexception:inner=${newline}${newline}[v${assembly-version}] ${exception:format=ToString}${newline}${exception:format=Data}${newline}}"; private static bool _isConfigured; diff --git a/src/Radarr.Api.V3/Collections/CollectionController.cs b/src/Radarr.Api.V3/Collections/CollectionController.cs index fa865870a..f9be01132 100644 --- a/src/Radarr.Api.V3/Collections/CollectionController.cs +++ b/src/Radarr.Api.V3/Collections/CollectionController.cs @@ -3,6 +3,7 @@ using System.IO; using System.Linq; using Microsoft.AspNetCore.Mvc; +using NLog; using NzbDrone.Common.Extensions; using NzbDrone.Core.Datastore.Events; using NzbDrone.Core.MediaCover; @@ -33,6 +34,7 @@ public class CollectionController : RestControllerWithSignalR GetCollections(int? tmdbId) { var collectionResources = new List(); + + _logger.Trace("Fetch Cover File Infos"); var coverFileInfos = _coverMapper.GetCoverFileInfos(); + _logger.Trace("Finished fetching Cover File Infos"); if (tmdbId.HasValue) { @@ -78,6 +85,8 @@ public List GetCollections(int? tmdbId) collectionResources = MapToResource(_collectionService.GetAllCollections(), coverFileInfos).ToList(); } + _logger.Trace("Returning Collections"); + return collectionResources; } @@ -141,13 +150,18 @@ private IEnumerable MapToResource(List coll { // Avoid calling for naming spec on every movie in filenamebuilder var namingConfig = _namingService.GetConfig(); + + _logger.Trace("Fetching Movies with Collections"); var collectionMovies = _movieMetadataService.GetMoviesWithCollections(); var existingMoviesTmdbIds = _movieService.AllMovieWithCollectionsTmdbIds(); + _logger.Trace("Mapping Collections"); foreach (var collection in collections) { + _logger.Trace("Mapping Collection {0}", collection.Title); var resource = collection.ToResource(); + _logger.Trace("Mapping Collection Movies for {0}", collection.Title); foreach (var movie in collectionMovies.Where(m => m.CollectionTmdbId == collection.TmdbId)) { var movieResource = movie.ToResource(); @@ -161,6 +175,7 @@ private IEnumerable MapToResource(List coll resource.Movies.Add(movieResource); } + _logger.Trace("Mapping Collection Covers for {0}", collection.Title); MapCoversToLocal(resource.Movies, coverFileInfos); yield return resource;