From 3ae0f2daa2b9fd5118b90ee2d4d55908ec235e2d Mon Sep 17 00:00:00 2001 From: Mbucari <37587114+Mbucari@users.noreply.github.com> Date: Fri, 3 Sep 2021 22:40:35 -0600 Subject: [PATCH] Fixed FindInactiveBooks to work with new logger. --- ApplicationServices/LibraryCommands.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ApplicationServices/LibraryCommands.cs b/ApplicationServices/LibraryCommands.cs index a782ec7b..91c0b4d2 100644 --- a/ApplicationServices/LibraryCommands.cs +++ b/ApplicationServices/LibraryCommands.cs @@ -18,6 +18,8 @@ namespace ApplicationServices public static async Task> FindInactiveBooks(Func loginCallbackFactoryFunc, List existingLibrary, params Account[] accounts) { + logRestart(); + //These are the minimum response groups required for the //library scanner to pass all validation and filtering. LibraryResponseGroups = @@ -30,8 +32,12 @@ namespace ApplicationServices try { + logTime($"pre {nameof(scanAccountsAsync)} all"); var libraryItems = await scanAccountsAsync(loginCallbackFactoryFunc, accounts); - Log.Logger.Information($"GetAllLibraryItems: Total count {libraryItems.Count}"); + logTime($"post {nameof(scanAccountsAsync)} all"); + + var totalCount = libraryItems.Count; + Log.Logger.Information($"GetAllLibraryItems: Total count {totalCount}"); var missingBookList = existingLibrary.Where(b => !libraryItems.Any(i => i.DtoItem.Asin == b.Book.AudibleProductId)).ToList(); @@ -57,12 +63,14 @@ namespace ApplicationServices } catch (Exception ex) { - Log.Logger.Error(ex, "Error importing library"); + Log.Logger.Error(ex, "Error scanning library"); throw; } finally { LibraryResponseGroups = LibraryOptions.ResponseGroupOptions.ALL_OPTIONS; + stop(); + var putBreakPointHere = logOutput; } }