changeset 49:f8cd7db4178c

output number of checked saves.
author casties
date Thu, 23 Feb 2017 19:57:05 +0100
parents 6625019a0c96
children 1be17309db79
files importFromOpenMind/importer/check_ismi_transaction_log.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/importFromOpenMind/importer/check_ismi_transaction_log.py	Tue Feb 07 21:06:13 2017 +0100
+++ b/importFromOpenMind/importer/check_ismi_transaction_log.py	Thu Feb 23 19:57:05 2017 +0100
@@ -10,9 +10,9 @@
 omitDeleted = True
 
 # active log levels for logging
-logLevels = {'DEBUG', 'INFO', 'WARNING', 'ERROR', 'SYSMSG'}
+#logLevels = {'DEBUG', 'INFO', 'WARNING', 'ERROR', 'SYSMSG'}
 #logLevels = {'INFO', 'WARNING', 'ERROR', 'SYSMSG'}
-#logLevels = {'ERROR', 'SYSMSG'}
+logLevels = {'ERROR', 'SYSMSG'}
 
 def log(level, message):
     if level in logLevels:
@@ -282,6 +282,7 @@
     
     with open(inFilename) as f:
         linecnt = 0
+        savecnt = 0
         saving = 0
         openSaves = {}
         savingPrev = 0
@@ -297,6 +298,7 @@
             # parsing lines in order of specific match, not order of operation!
             #
             if '*** START Saving' in line:
+                savecnt += 1
                 saving += 1
                 # make sure delete is off
                 deleting = 0
@@ -465,7 +467,7 @@
             log('ERROR', "%s unprocessed previous saves!"%len(prevSaves))            
             log('DEBUG', prevSaves)
         
-        log("SYSMSG", "%s lines of logfile scanned"%linecnt)
+        log("SYSMSG", "%s form saves in %s lines of logfile"%(savecnt, linecnt))
         
 
 #