Index: trunk/src/python/unifiedlogger/logging_service.py
===================================================================
--- trunk/src/python/unifiedlogger/logging_service.py	(revision 454)
+++ trunk/src/python/unifiedlogger/logging_service.py	(revision 461)
@@ -1,3 +1,3 @@
-import cms_watcher, cad_watcher, time, json, ConfigParser
+import cms_watcher, cad_watcher, activitylog_watcher, time, json, ConfigParser
 # Unified Logging Service
 # jdalbey 7/6/2019
@@ -29,8 +29,8 @@
     f.close()            
     # List of the available plugin modules 
-    plugins = ["cms_watcher","cad_watcher"]
+    plugins = ["cms_watcher","cad_watcher","activitylog_watcher"]
     #FOR each plugin LOOP
     for plugin in plugins:
-        # dynamically load the setup function for this plugin
+        # dynamically load the setup function for this plugin        
         plugmodule = globals()[plugin]
         setupfunc = getattr(plugmodule, 'setup')
Index: trunk/src/python/unifiedlogger/wing_project.wpr
===================================================================
--- trunk/src/python/unifiedlogger/wing_project.wpr	(revision 454)
+++ trunk/src/python/unifiedlogger/wing_project.wpr	(revision 461)
@@ -184,38 +184,38 @@
                        'toolbox-tree-sel': ''})],
         'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('logging_service.py'),
-        {'attrib-starts': [('startup|0|',
-                            17)],
-         'code-line': 'def startup():\n',
-         'first-line': 12L,
+        {'attrib-starts': [('getSimTime|0|',
+                            7)],
+         'code-line': '       print "Error loading json for elapsed time"\n',
+         'first-line': 0L,
          'folded-linenos': [],
-         'sel-line': 17L,
-         'sel-line-start': 513L,
-         'selection_end': 527L,
-         'selection_start': 527L,
+         'sel-line': 14L,
+         'sel-line-start': 410L,
+         'selection_end': 460L,
+         'selection_start': 460L,
          'zoom': 0L},
-        1563295110.747974],
-        [loc('get_app_properties.py'),
+        1563914714.187541],
+        [loc('cad_watcher.py'),
+         {'attrib-starts': [('isFull|0|',
+                             16)],
+          'code-line': '\n',
+          'first-line': 18L,
+          'folded-linenos': [],
+          'sel-line': 18L,
+          'sel-line-start': 559L,
+          'selection_end': 559L,
+          'selection_start': 559L,
+          'zoom': 0L},
+         1563914983.485065],
+        [loc('activitylog_watcher.py'),
          {'attrib-starts': [],
-          'code-line': '',
-          'first-line': 0L,
-          'folded-linenos': [],
-          'sel-line': 0L,
-          'sel-line-start': 0L,
-          'selection_end': 0L,
-          'selection_start': 0L,
-          'zoom': 0L},
-         1563295114.739899],
-        [loc('logging_service.py'),
-         {'attrib-starts': [('startup|0|',
-                             17)],
-          'code-line': 'def startup():\n',
-          'first-line': 12L,
-          'folded-linenos': [],
-          'sel-line': 17L,
-          'sel-line-start': 513L,
-          'selection_end': 527L,
-          'selection_start': 527L,
-          'zoom': 0L},
-         1563295120.252652],
+          'code-line': '# Local main for unit testing\n',
+          'first-line': 48L,
+          'folded-linenos': [],
+          'sel-line': 50L,
+          'sel-line-start': 1431L,
+          'selection_end': 1460L,
+          'selection_start': 1460L,
+          'zoom': 0L},
+         1563915276.741928],
         [loc('../../../../../../../../usr/lib/python2.7/ConfigParser.py'),
          {'attrib-starts': [('ConfigParser|0|',
@@ -231,160 +231,16 @@
           'selection_start': 22028L,
           'zoom': 0L},
-         1563295122.349933],
-        [loc('logging_service.py'),
-         {'attrib-starts': [('startup|0|',
-                             17)],
-          'code-line': 'def startup():\n',
-          'first-line': 12L,
-          'folded-linenos': [],
-          'sel-line': 17L,
-          'sel-line-start': 513L,
-          'selection_end': 527L,
-          'selection_start': 527L,
-          'zoom': 0L},
-         1563295126.806403],
-        [loc('__main__.py'),
-         {'attrib-starts': [('main|0|',
-                             2)],
-          'code-line': '    except:  # If config file not found, use a quest'\
-                       'ion mark placeholder \n',
-          'first-line': 0L,
-          'folded-linenos': [],
-          'sel-line': 8L,
-          'sel-line-start': 356L,
-          'selection_end': 417L,
-          'selection_start': 417L,
-          'zoom': 0L},
-         1563298825.820571],
-        [loc('cad_watcher.py'),
-         {'attrib-starts': [('readFile|0|',
-                             20)],
-          'code-line': 'def readFile():\n',
-          'first-line': 15L,
-          'folded-linenos': [],
-          'sel-line': 20L,
-          'sel-line-start': 575L,
-          'selection_end': 590L,
-          'selection_start': 590L,
-          'zoom': 0L},
-         1563298863.068667],
-        [loc('logging_service.py'),
-         {'attrib-starts': [('startup|0|',
-                             17)],
-          'code-line': 'def startup():\n',
-          'first-line': 12L,
-          'folded-linenos': [],
-          'sel-line': 17L,
-          'sel-line-start': 513L,
-          'selection_end': 527L,
-          'selection_start': 527L,
-          'zoom': 0L},
-         1563298890.003056],
-        [loc('../../../config/logging_service.cfg'),
+         1563915287.423714],
+        [loc('activitylog_watcher.py'),
          {'attrib-starts': [],
-          'code-line': '[Paths]\n',
-          'first-line': 0L,
-          'folded-linenos': [],
-          'sel-line': 0L,
-          'sel-line-start': 0L,
-          'selection_end': 0L,
-          'selection_start': 0L,
-          'zoom': 0L},
-         1563298905.850272],
-        [loc('logging_service.py'),
-         {'attrib-starts': [('startup|0|',
-                             17)],
-          'code-line': '    # get path to output file from configuration\n',
-          'first-line': 12L,
-          'folded-linenos': [],
-          'sel-line': 18L,
-          'sel-line-start': 528L,
-          'selection_end': 720L,
-          'selection_start': 528L,
-          'zoom': 0L},
-         1563298925.9103],
-        [loc('cad_watcher.py'),
-         {'attrib-starts': [('readFile|0|',
-                             20)],
-          'code-line': '        text_file = open(logfilepath + "CADcomments.'\
-                       'log", "r")\n',
-          'first-line': 12L,
-          'folded-linenos': [],
-          'sel-line': 28L,
-          'sel-line-start': 813L,
-          'selection_end': 852L,
-          'selection_start': 852L,
-          'zoom': 0L},
-         1563298944.867817],
-        [loc('logging_service.py'),
-         {'attrib-starts': [('startup|0|',
-                             17)],
-          'code-line': '    # get path to output file from configuration\n',
-          'first-line': 12L,
-          'folded-linenos': [],
-          'sel-line': 18L,
-          'sel-line-start': 528L,
-          'selection_end': 720L,
-          'selection_start': 528L,
-          'zoom': 0L},
-         1563298961.49365],
-        [loc('../../../config/logging_service.cfg'),
-         {'attrib-starts': [],
-          'code-line': '[Paths]\n',
-          'first-line': 0L,
-          'folded-linenos': [],
-          'sel-line': 0L,
-          'sel-line-start': 0L,
-          'selection_end': 0L,
-          'selection_start': 0L,
-          'zoom': 0L},
-         1563298965.173624],
-        [loc('cad_watcher.py'),
-         {'attrib-starts': [('readFile|0|',
-                             20)],
-          'code-line': '    config = ConfigParser.ConfigParser()\n',
-          'first-line': 0L,
-          'folded-linenos': [],
-          'sel-line': 22L,
-          'sel-line-start': 640L,
-          'selection_end': 640L,
-          'selection_start': 640L,
-          'zoom': 0L},
-         1563299005.834573],
-        [loc('__main__.py'),
-         {'attrib-starts': [],
-          'code-line': 'import logging_service, os, ConfigParser\n',
-          'first-line': 0L,
-          'folded-linenos': [],
-          'sel-line': 0L,
-          'sel-line-start': 0L,
-          'selection_end': 40L,
-          'selection_start': 28L,
-          'zoom': 0L},
-         1563299012.548244],
-        [loc('cad_watcher.py'),
-         {'attrib-starts': [('readFile|0|',
-                             20)],
-          'code-line': '    # get path to input file from configuration\n',
+          'code-line': '# Local main for unit testing\n',
           'first-line': 18L,
           'folded-linenos': [],
-          'sel-line': 21L,
-          'sel-line-start': 605L,
-          'selection_end': 628L,
-          'selection_start': 628L,
-          'zoom': 0L},
-         1563311309.128491],
-        [loc('logging_service.py'),
-         {'attrib-starts': [('getSimTime|0|',
-                             7)],
-          'code-line': '    h, m = divmod(m, 60)\n',
-          'first-line': 3L,
-          'folded-linenos': [],
-          'sel-line': 14L,
-          'sel-line-start': 444L,
-          'selection_end': 468L,
-          'selection_start': 468L,
-          'zoom': 0L},
-         1563311363.078389],
+          'sel-line': 50L,
+          'sel-line-start': 1431L,
+          'selection_end': 1460L,
+          'selection_start': 1460L,
+          'zoom': 0L},
+         1563915319.659486],
         [loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'),
          {'attrib-starts': [('JSONDecoder|0|',
@@ -400,70 +256,205 @@
           'selection_start': 13534L,
           'zoom': 0L},
-         1563311407.328163],
+         1563915321.261377],
+        [loc('activitylog_watcher.py'),
+         {'attrib-starts': [],
+          'code-line': '# Local main for unit testing\n',
+          'first-line': 18L,
+          'folded-linenos': [],
+          'sel-line': 50L,
+          'sel-line-start': 1431L,
+          'selection_end': 1460L,
+          'selection_start': 1460L,
+          'zoom': 0L},
+         1563915322.700758],
+        [loc('__main__.py'),
+         {'attrib-starts': [],
+          'code-line': 'import logging_service, os, ConfigParser\n',
+          'first-line': 0L,
+          'folded-linenos': [],
+          'sel-line': 0L,
+          'sel-line-start': 0L,
+          'selection_end': 40L,
+          'selection_start': 28L,
+          'zoom': 0L},
+         1563915338.030142],
         [loc('logging_service.py'),
-         {'attrib-starts': [('getSimTime|0|',
-                             7)],
-          'code-line': '    h, m = divmod(m, 60)\n',
+         {'attrib-starts': [('startup|0|',
+                             20)],
+          'code-line': '        # dynamically load the setup function for th'\
+                       'is plugin        \n',
+          'first-line': 24L,
+          'folded-linenos': [],
+          'sel-line': 33L,
+          'sel-line-start': 1119L,
+          'selection_end': 1180L,
+          'selection_start': 1180L,
+          'zoom': 0L},
+         1563915525.660434],
+        [loc('cms_watcher.py'),
+         {'attrib-starts': [],
+          'code-line': '# Read the cms message file\n',
+          'first-line': 12L,
+          'folded-linenos': [],
+          'sel-line': 17L,
+          'sel-line-start': 410L,
+          'selection_end': 606L,
+          'selection_start': 410L,
+          'zoom': 0L},
+         1563915548.444179],
+        [loc('activitylog_watcher.py'),
+         {'attrib-starts': [('getLogEntries|0|',
+                             42)],
+          'code-line': '    currList = []\n',
+          'first-line': 33L,
+          'folded-linenos': [],
+          'sel-line': 45L,
+          'sel-line-start': 1303L,
+          'selection_end': 1303L,
+          'selection_start': 1303L,
+          'zoom': 0L},
+         1563915776.997235],
+        [loc('logging_service.py'),
+         {'attrib-starts': [('startup|0|',
+                             20)],
+          'code-line': '                trimmed_item = item.strip()\n',
+          'first-line': 30L,
+          'folded-linenos': [],
+          'sel-line': 57L,
+          'sel-line-start': 1955L,
+          'selection_end': 1955L,
+          'selection_start': 1955L,
+          'zoom': 0L},
+         1563915793.39434],
+        [loc('activitylog_watcher.py'),
+         {'attrib-starts': [('getLogEntries|0|',
+                             42)],
+          'code-line': '    return currList\n',
+          'first-line': 37L,
+          'folded-linenos': [],
+          'sel-line': 48L,
+          'sel-line-start': 1427L,
+          'selection_end': 1427L,
+          'selection_start': 1427L,
+          'zoom': 0L},
+         1563915821.788454],
+        [loc('logging_service.py'),
+         {'attrib-starts': [('startup|0|',
+                             20)],
+          'code-line': '                trimmed_item = item.strip()\n',
+          'first-line': 39L,
+          'folded-linenos': [],
+          'sel-line': 57L,
+          'sel-line-start': 1955L,
+          'selection_end': 1955L,
+          'selection_start': 1955L,
+          'zoom': 0L},
+         1563915837.345044],
+        [loc('activitylog_watcher.py'),
+         {'attrib-starts': [('getLogEntries|0|',
+                             42)],
+          'code-line': '    return currList\n',
+          'first-line': 37L,
+          'folded-linenos': [],
+          'sel-line': 48L,
+          'sel-line-start': 1427L,
+          'selection_end': 1427L,
+          'selection_start': 1427L,
+          'zoom': 0L},
+         1563915839.151954],
+        [loc('logging_service.py'),
+         {'attrib-starts': [('startup|0|',
+                             20)],
+          'code-line': '                trimmed_item = item.strip()\n',
+          'first-line': 50L,
+          'folded-linenos': [],
+          'sel-line': 57L,
+          'sel-line-start': 1955L,
+          'selection_end': 1955L,
+          'selection_start': 1955L,
+          'zoom': 0L},
+         1563915884.294776],
+        [loc('activitylog_watcher.py'),
+         {'attrib-starts': [('getLogEntries|0|',
+                             42)],
+          'code-line': '    return currList\n',
+          'first-line': 37L,
+          'folded-linenos': [],
+          'sel-line': 48L,
+          'sel-line-start': 1427L,
+          'selection_end': 1427L,
+          'selection_start': 1427L,
+          'zoom': 0L},
+         1563915907.118035],
+        [loc('logging_service.py'),
+         {'attrib-starts': [('startup|0|',
+                             20)],
+          'code-line': '                trimmed_item = item.strip()\n',
+          'first-line': 50L,
+          'folded-linenos': [],
+          'sel-line': 57L,
+          'sel-line-start': 1955L,
+          'selection_end': 1955L,
+          'selection_start': 1955L,
+          'zoom': 0L},
+         1563915945.26135],
+        [loc('activitylog_watcher.py'),
+         {'attrib-starts': [('getLogEntries|0|',
+                             42)],
+          'code-line': '    currList = []\n',
+          'first-line': 37L,
+          'folded-linenos': [],
+          'sel-line': 45L,
+          'sel-line-start': 1303L,
+          'selection_end': 1303L,
+          'selection_start': 1303L,
+          'zoom': 0L},
+         1563916207.12504],
+        [loc('cms_watcher.py'),
+         {'attrib-starts': [('readFile|0|',
+                             18)],
+          'code-line': ' \n',
           'first-line': 6L,
           'folded-linenos': [],
-          'sel-line': 14L,
-          'sel-line-start': 444L,
-          'selection_end': 468L,
-          'selection_start': 468L,
-          'zoom': 0L},
-         1563311428.009251],
-        [loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'),
-         {'attrib-starts': [('JSONDecoder|0|',
-                             271),
-                            ('JSONDecoder|0|.raw_decode|0|',
-                             369)],
-          'code-line': '            obj, end = self.scan_once(s, idx)\n',
-          'first-line': 370L,
-          'folded-linenos': [],
-          'sel-line': 379L,
-          'sel-line-start': 13534L,
-          'selection_end': 13534L,
-          'selection_start': 13534L,
-          'zoom': 0L},
-         1563311437.82119]],
+          'sel-line': 21L,
+          'sel-line-start': 564L,
+          'selection_end': 565L,
+          'selection_start': 565L,
+          'zoom': 0L},
+         1563916220.372856]],
         20),
-        'current-loc': loc('logging_service.py'),
-        'editor-state-list': [(loc('cad_watcher.py'),
-                               {'attrib-starts': [('readFile|0|',
-        20)],
-                                'code-line': '    # get path to input file f'\
-        'rom configuration\n',
+        'current-loc': loc('activitylog_watcher.py'),
+        'editor-state-list': [(loc('activitylog_watcher.py'),
+                               {'attrib-starts': [],
+                                'code-line': '# Local main for unit testing'\
+        '\n',
+                                'first-line': 43L,
+                                'folded-linenos': [],
+                                'sel-line': 57L,
+                                'sel-line-start': 1714L,
+                                'selection_end': 1743L,
+                                'selection_start': 1743L,
+                                'zoom': 0L}),
+                              (loc('cad_watcher.py'),
+                               {'attrib-starts': [('isFull|0|',
+        16)],
+                                'code-line': '\n',
                                 'first-line': 18L,
                                 'folded-linenos': [],
-                                'sel-line': 21L,
-                                'sel-line-start': 605L,
-                                'selection_end': 628L,
-                                'selection_start': 628L,
+                                'sel-line': 18L,
+                                'sel-line-start': 559L,
+                                'selection_end': 559L,
+                                'selection_start': 559L,
                                 'zoom': 0L}),
                               (loc('cms_watcher.py'),
-                               {'attrib-starts': [('isEmpty|0|',
-        12)],
-                                'code-line': '     return cmsitem == ":::::"'\
-        '\n',
-                                'first-line': 0L,
+                               {'attrib-starts': [('readFile|0|',
+        18)],
+                                'code-line': ' \n',
+                                'first-line': 6L,
                                 'folded-linenos': [],
-                                'sel-line': 13L,
-                                'sel-line-start': 324L,
-                                'selection_end': 353L,
-                                'selection_start': 353L,
-                                'zoom': 0L}),
-                              (loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'),
-                               {'attrib-starts': [('JSONDecoder|0|',
-        271),
-        ('JSONDecoder|0|.raw_decode|0|',
-         369)],
-                                'code-line': '            obj, end = self.sc'\
-        'an_once(s, idx)\n',
-                                'first-line': 370L,
-                                'folded-linenos': [],
-                                'sel-line': 379L,
-                                'sel-line-start': 13534L,
-                                'selection_end': 13534L,
-                                'selection_start': 13534L,
+                                'sel-line': 21L,
+                                'sel-line-start': 564L,
+                                'selection_end': 565L,
+                                'selection_start': 565L,
                                 'zoom': 0L}),
                               (loc('../../../config/logging_service.cfg'),
@@ -478,14 +469,14 @@
                                 'zoom': 0L}),
                               (loc('logging_service.py'),
-                               {'attrib-starts': [('getSimTime|0|',
-        7)],
-                                'code-line': '       print "Error loading js'\
-        'on for elapsed time"\n',
-                                'first-line': 0L,
+                               {'attrib-starts': [('startup|0|',
+        20)],
+                                'code-line': '                trimmed_item ='\
+        ' item.strip()\n',
+                                'first-line': 50L,
                                 'folded-linenos': [],
-                                'sel-line': 14L,
-                                'sel-line-start': 410L,
-                                'selection_end': 460L,
-                                'selection_start': 460L,
+                                'sel-line': 57L,
+                                'sel-line-start': 1955L,
+                                'selection_end': 1955L,
+                                'selection_start': 1955L,
                                 'zoom': 0L}),
                               (loc('__main__.py'),
@@ -502,15 +493,16 @@
         'has-focus': True,
         'locked': False},
-        [loc('cad_watcher.py'),
+        [loc('activitylog_watcher.py'),
+         loc('cad_watcher.py'),
          loc('cms_watcher.py'),
-         loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'),
          loc('../../../config/logging_service.cfg'),
          loc('logging_service.py'),
          loc('__main__.py')]),
                                'open_files': [u'../../../config/logging_service.cfg',
+        u'cad_watcher.py',
         u'__main__.py',
+        u'logging_service.py',
         u'cms_watcher.py',
-        u'cad_watcher.py',
-        u'logging_service.py']},
+        u'activitylog_watcher.py']},
         'saved_notebook_display': None,
         'split_percents': {0: 0.5},
@@ -519,5 +511,5 @@
         'traversal_pos': ((0,
                            3),
-                          1563311427.998152),
+                          1563915857.693931),
         'user_data': {}},
                  'saved_notebook_display': None,
@@ -527,5 +519,5 @@
                  'traversal_pos': ((0,
                                     4),
-                                   1563311544.529663),
+                                   1563916336.330344),
                  'user_data': {}},
         'window-alloc': (29,
@@ -533,10 +525,10 @@
                          1197,
                          722)}]}
-guimgr.recent-documents = [loc('logging_service.py'),
-                           loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'),
+guimgr.recent-documents = [loc('activitylog_watcher.py'),
+                           loc('cms_watcher.py'),
+                           loc('logging_service.py'),
+                           loc('__main__.py'),
                            loc('cad_watcher.py'),
-                           loc('__main__.py'),
-                           loc('../../../config/logging_service.cfg'),
-                           loc('cms_watcher.py')]
+                           loc('../../../config/logging_service.cfg')]
 guimgr.visual-state = {loc('get_app_properties.py'): {'attrib-starts': [],
         'code-line': '',
@@ -582,4 +574,17 @@
         'selection_end': 22028L,
         'selection_start': 22028L,
+        'zoom': 0L},
+                       loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'): {'a'\
+        'ttrib-starts': [('JSONDecoder|0|',
+                          271),
+                         ('JSONDecoder|0|.raw_decode|0|',
+                          369)],
+        'code-line': '            obj, end = self.scan_once(s, idx)\n',
+        'first-line': 370L,
+        'folded-linenos': [],
+        'sel-line': 379L,
+        'sel-line-start': 13534L,
+        'selection_end': 13534L,
+        'selection_start': 13534L,
         'zoom': 0L}}
 proj.build-cmd = {None: ('default',
Index: trunk/src/python/unifiedlogger/activitylog_watcher.py
===================================================================
--- trunk/src/python/unifiedlogger/activitylog_watcher.py	(revision 461)
+++ trunk/src/python/unifiedlogger/activitylog_watcher.py	(revision 461)
@@ -0,0 +1,72 @@
+import json, time, ConfigParser
+from copy import deepcopy
+
+# Incident Activity log Watcher
+# Look for changes in the IncidentActivity log.
+# The comments from the Incident Activity log be will appended to the log 
+# as they arrive from the web app.
+# We only need to keep track of the log length in order to
+# determine if a new comment has been added.  We will output the 
+# new messages that arrived during the last wait interval. 
+# jdalbey  7/24/2019
+
+lastLineNum = 0
+
+# Utility functions
+def isEmpty(cmsitem):
+    return cmsitem == ",,,,,"
+def isFull(cmsitem):
+    return not isEmpty(cmsitem)
+
+# Read the log 
+def readFile():
+    # get path to input file from configuration
+    config = ConfigParser.ConfigParser()
+    config.read('config/logging_service.cfg')
+    logfilepath  = config.get('Paths', 'UnifiedLogPath')
+    
+    lines = []
+    try:
+        json_file = open (logfilepath + "IncidentActivity.log",'r')
+    except IOError:
+        print "Error: missing "+logfilepath+"IncidentActivity.log file."
+    else:
+        jsonData=json_file.read()
+        json_file.close()
+    return json.loads(jsonData)['data']    
+    
+def setup():
+    # nothing needed for setup
+    return
+
+# Retrieve new messages from activity log 
+def getLogEntries():
+    global lastLineNum
+    msgList = readFile()
+    currList = []
+    currList = msgList[lastLineNum:]    # new items since last file read
+    lastLineNum = len(msgList)-1
+    resultList = []
+    # Format messages into desired result format
+    for item in currList:
+        # extract desired fields
+        desiredFields = "Activity Log: "+item[3]+item[4]+item[5]
+        # Append to results list
+        resultList.append(desiredFields)
+    return resultList
+
+# Local main for unit testing
+def main():
+    setup()
+    # Loop Forever, checking every five seconds
+    while True:
+        # Look for new messages
+        answer = getLogEntries()
+        # Output results
+        for item in answer:
+            print item
+        # wait 
+        time.sleep(5)
+
+if __name__ == "__main__":
+    main()
