Index: trunk/src/python/unifiedlogger/logging_service.py
===================================================================
--- trunk/src/python/unifiedlogger/logging_service.py	(revision 683)
+++ trunk/src/python/unifiedlogger/logging_service.py	(revision 687)
@@ -12,7 +12,7 @@
     
 # Load the sim time file and extract the seconds */
-def getSimTime():
+def getSimTime(path):
     global seconds    
-    with open ("webapps/dynamicdata/sim_elapsedtime.json", 'r') as myfile:
+    with open (path+"sim_elapsedtime.json", 'r') as myfile:
         jsonData=myfile.read()
     try:     
@@ -37,5 +37,5 @@
     config.read(configdir + '/logging_service.cfg')
     logfilepath  = config.get('Paths', 'UnifiedLogPath')
-    
+
     # Delete any previously existing output file
     f = open(logfilepath + outputFilename, "w")
@@ -49,5 +49,5 @@
         setupfunc = getattr(plugmodule, 'setup')
         #Call setup
-        setupfunc()
+        setupfunc(configdir)
     #END LOOP
     
@@ -55,5 +55,5 @@
     while True:
     #    Get simulation time
-        timeStamp = getSimTime()
+        timeStamp = getSimTime(logfilepath)
     #    Reset Output Buffer
         output = ""
@@ -66,5 +66,5 @@
             
     #        Run the plugin process returning new log entries
-            results = getfunc()     
+            results = getfunc()
     #       Append simulation time and the log entries to the Output Buffer
             for item in results:
@@ -87,5 +87,5 @@
 #END DO
 
-# for unit testing
+# Entry point for application
 if __name__ == '__main__':
     startup(sys.argv)
Index: trunk/src/python/unifiedlogger/har_watcher.py
===================================================================
--- trunk/src/python/unifiedlogger/har_watcher.py	(revision 649)
+++ trunk/src/python/unifiedlogger/har_watcher.py	(revision 687)
@@ -1,3 +1,3 @@
-import json, time
+import json, time, ConfigParser
 from copy import deepcopy
 
@@ -9,4 +9,5 @@
 currList = []  # current messages
 locationMap = {} # map of HAR ID's to locations
+filepath = "webapps/dynamicdata" # default during development
 
 # Utility functions
@@ -17,9 +18,10 @@
 
 # Read the har message file
-def readFile():     
-     with open ("webapps/dynamicdata/har_messages.json",'r') as myfile:
+def readFile():
+    global filepath
+    with open (filepath+"/har_messages.json",'r') as myfile:
           jsonData=myfile.read()
  
-     return json.loads(jsonData)['data']
+    return json.loads(jsonData)['data']
 
 # Read the static file of cms locations and create a lookup map
@@ -51,6 +53,12 @@
           currList.append(aMessage.replace("\n"," ").strip())
 
-def setup():
-     extractMessages(initialize())
+def setup(dir):
+    global filepath
+    # get path to input file from configuration
+    config = ConfigParser.ConfigParser()
+    config.read(dir+'/logging_service.cfg')
+    filepath  = config.get('Paths', 'UnifiedLogPath')
+
+    extractMessages(initialize())
 
 # compare previous messages to current messages to look for changes
@@ -81,5 +89,5 @@
 def main():
      global currList
-     setup()
+     setup("config/devlinux")
      # Loop Forever
      while True:
Index: trunk/src/python/unifiedlogger/activitylog_watcher.py
===================================================================
--- trunk/src/python/unifiedlogger/activitylog_watcher.py	(revision 647)
+++ trunk/src/python/unifiedlogger/activitylog_watcher.py	(revision 687)
@@ -34,4 +34,5 @@
 file1length = 0
 file2length = 0
+configdir = "config"  # default dir for production
 
 # Utility functions
@@ -42,6 +43,7 @@
 # get path to input file from configuration
 def getLogFilePath():
+    global configdir
     config = ConfigParser.ConfigParser()
-    config.read('config/logging_service.cfg')
+    config.read(configdir+'/logging_service.cfg')
     return config.get('Paths', 'ActivityLogPath')
 
@@ -50,6 +52,7 @@
 # jdalbey 2022.9.1
 def getLogFilenames():
+    global configdir
     config = ConfigParser.ConfigParser()
-    config.read('config/logging_service.cfg')
+    config.read(configdir+'/logging_service.cfg')
     file1 = config.get('Files','ActivityLogDataFilename')
     file2 = config.get('Files','ActivityLogSummaryFilename')
@@ -124,11 +127,12 @@
     return resultList
 
-def setup():
-    # nothing needed for setup
+def setup(dir):
+    global configdir
+    configdir = dir
     return
 
 # Local main for unit testing
 def main():
-    setup()
+    setup("config/devlinux")
     # Loop Forever, checking every five seconds
     while True:
Index: trunk/src/python/unifiedlogger/cms_watcher.py
===================================================================
--- trunk/src/python/unifiedlogger/cms_watcher.py	(revision 549)
+++ trunk/src/python/unifiedlogger/cms_watcher.py	(revision 687)
@@ -1,3 +1,3 @@
-import json, time
+import json, time, ConfigParser
 from copy import deepcopy
 
@@ -9,4 +9,5 @@
 currList = []  # current messages
 locationMap = {} # map of CMS ID's to locations
+filepath = "webapps/dynamicdata" # default during development
 
 # Utility functions
@@ -17,9 +18,10 @@
 
 # Read the cms message file
-def readFile():     
-     with open ("webapps/dynamicdata/cms_messages.json",'r') as myfile:
+def readFile():
+    global filepath
+    with open (filepath+"/cms_messages.json",'r') as myfile:
           jsonData=myfile.read()
  
-     return json.loads(jsonData)['data']
+    return json.loads(jsonData)['data']
 
 # Read the static file of cms locations and create a lookup map
@@ -56,6 +58,12 @@
                     msgList[idx]['cms']['message']['phase2']['Line3'])
 
-def setup():
-     extractMessages(initialize())
+def setup(dir):
+    global filepath
+    # get path to input file from configuration
+    config = ConfigParser.ConfigParser()
+    config.read(dir+'/logging_service.cfg')
+    filepath  = config.get('Paths', 'UnifiedLogPath')
+   
+    extractMessages(initialize())
 
 # compare previous messages to current messages to look for changes
@@ -86,5 +94,5 @@
 def main():
      global currList
-     setup()
+     setup("config/devlinux")
      # Loop Forever
      while True:
Index: trunk/src/python/unifiedlogger/cad_watcher.py
===================================================================
--- trunk/src/python/unifiedlogger/cad_watcher.py	(revision 522)
+++ trunk/src/python/unifiedlogger/cad_watcher.py	(revision 687)
@@ -11,15 +11,18 @@
 
 lastLineNum = 0
+configdir = "config"  # default dir for production
 
-def setup():
+def setup(dir):
+    global lastLineNum, configdir
     lastLineNum = 0
+    configdir = dir
     return
 
 # Retrieve new messages from CAD comment log 
 def getLogEntries():
-    global lastLineNum
+    global lastLineNum, configdir
     # get path to input file from configuration
     config = ConfigParser.ConfigParser()
-    config.read('config/logging_service.cfg')
+    config.read(configdir+'/logging_service.cfg')
     logfilepath  = config.get('Paths', 'UnifiedLogPath')
     pathToLog = logfilepath + "CADcomments.log"
@@ -29,7 +32,8 @@
     except IOError as ex:
         if ex.errno == 2:
-            # 'No such file or directory
-            print pathToLog + " missing: assuming reset."
-            lastLineNum = 0   #Start over
+            # 'No such file or directory'
+            # Assume this is a read sync problem: Don't modify lastLineNum
+            print pathToLog + " missing, skipping file read."
+            #lastLineNum = 0   #Start over
             return []
         else:
@@ -41,19 +45,18 @@
         fileSize = os.path.getsize(pathToLog)
         if fileSize == 0:
-            # Assume this is a read sync problem: Don't modify lastLineNum
-            print pathToLog+" is empty, ignoring."
+            print pathToLog+" is empty, skipping file read and resetting."
             lastLineNum = 0   #Start over
             return []
         else: # file is good, read it.
-            msgList = text_file.read().split('\n')
+            msgList = text_file.read().strip().split('\n')
             text_file.close()
             currList = []
             currList = msgList[lastLineNum:] # new items since last file read
-            lastLineNum = len(msgList)-1
+            lastLineNum = len(msgList)
             return currList
 
 # Local main for unit testing
 def main():
-    setup()
+    setup("config/devlinux")
     # Loop Forever, checking every five seconds
     while True:
