From 5895831ba8a4b35a6780cc6a9c4a5563f8e5ebf8 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 24 Jul 2016 18:46:24 -0500 Subject: [PATCH] Clean up logging Moved incremental log line to display only if there's actual items to process. --- resources/lib/librarysync.py | 2 +- resources/lib/loghandler.py | 2 +- service.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 72277fa0..4c7ff088 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -807,11 +807,11 @@ class LibrarySync(threading.Thread): incSyncIndicator = int(settings('incSyncIndicator')) totalUpdates = len(self.addedItems) + len(self.updateItems) + len(self.userdataItems) + len(self.removeItems) - log.info("incSyncIndicator=" + str(incSyncIndicator) + " totalUpdates=" + str(totalUpdates)) if incSyncIndicator != -1 and totalUpdates > incSyncIndicator: # Only present dialog if we are going to process items pDialog = self.progressDialog('Incremental sync') + log.info("incSyncIndicator=" + str(incSyncIndicator) + " totalUpdates=" + str(totalUpdates)) process = { diff --git a/resources/lib/loghandler.py b/resources/lib/loghandler.py index 616ea1b9..b576e078 100644 --- a/resources/lib/loghandler.py +++ b/resources/lib/loghandler.py @@ -38,7 +38,7 @@ class LogHandler(logging.StreamHandler): logging.ERROR: 0, logging.WARNING: 0, logging.INFO: 1, - logging.DEBUG: 2, + logging.DEBUG: 2 } try: logLevel = int(window('emby_logLevel')) diff --git a/service.py b/service.py index f88b5c32..d70dd2b4 100644 --- a/service.py +++ b/service.py @@ -298,8 +298,8 @@ class Service(): # Delay option delay = int(settings('startupDelay')) +log.warn("Delaying emby startup by: %s sec..." % delay) -log.info("Delaying emby startup by: %s sec..." % delay) if delay and xbmc.Monitor().waitForAbort(delay): # Start the service log.warn("Abort requested while waiting. Emby for kodi not started.")