Updated logging to be more concise when debug is not active
This commit is contained in:
@@ -73,27 +73,27 @@ public sealed class StaleMediaTask : IScheduledTask
|
|||||||
|
|
||||||
List<BaseItem> allItems = [.. _libraryManager.GetItemsResult(query).Items];
|
List<BaseItem> allItems = [.. _libraryManager.GetItemsResult(query).Items];
|
||||||
|
|
||||||
_loggingHelper.LogInformation("Total items: {ItemCount}", allItems.Count);
|
_loggingHelper.LogInformation("Total items to scan: {ItemCount}", allItems.Count);
|
||||||
_loggingHelper.LogDebugInformation("Items found: {AllItems}", allItems);
|
_loggingHelper.LogDebugInformation("Items found: {AllItems}", allItems);
|
||||||
|
|
||||||
List<BaseItem> series = [.. allItems.Where(item => item.GetBaseItemKind() == BaseItemKind.Series)];
|
List<BaseItem> series = [.. allItems.Where(item => item.GetBaseItemKind() == BaseItemKind.Series)];
|
||||||
List<BaseItem> movies = [.. allItems.Where(item => item.GetBaseItemKind() == BaseItemKind.Movie)];
|
List<BaseItem> movies = [.. allItems.Where(item => item.GetBaseItemKind() == BaseItemKind.Movie)];
|
||||||
|
|
||||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||||
_loggingHelper.LogInformation("Starting scan of series items.");
|
_loggingHelper.LogDebugInformation("Starting scan of series items.");
|
||||||
|
|
||||||
List<BaseItem> staleSeasons = [.. series.SelectMany(GetStaleSeasons)];
|
List<BaseItem> staleSeasons = [.. series.SelectMany(GetStaleSeasons)];
|
||||||
|
|
||||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||||
_loggingHelper.LogInformation("End of scan for series items.");
|
_loggingHelper.LogDebugInformation("End of scan for series items.");
|
||||||
|
|
||||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||||
_loggingHelper.LogInformation("Starting scan of movie items.");
|
_loggingHelper.LogDebugInformation("Starting scan of movie items.");
|
||||||
|
|
||||||
List<BaseItem> staleMovies = [.. GetStaleMovies(movies)];
|
List<BaseItem> staleMovies = [.. GetStaleMovies(movies)];
|
||||||
|
|
||||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
_loggingHelper.LogDebugInformation("-------------------------------------------------");
|
||||||
_loggingHelper.LogInformation("End of scan for movie items.");
|
_loggingHelper.LogDebugInformation("End of scan for movie items.");
|
||||||
|
|
||||||
_loggingHelper.LogInformation("-------------------------------------------------");
|
_loggingHelper.LogInformation("-------------------------------------------------");
|
||||||
_loggingHelper.LogInformation("Stale seasons found: {StaleSeasons}", staleSeasons.Count);
|
_loggingHelper.LogInformation("Stale seasons found: {StaleSeasons}", staleSeasons.Count);
|
||||||
|
|||||||
Reference in New Issue
Block a user