Changeset 687 in tmcsimulator for trunk/src/python/unifiedlogger/logging_service.py
- Timestamp:
- 10/02/2022 10:32:42 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/python/unifiedlogger/logging_service.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/python/unifiedlogger/logging_service.py
r683 r687 12 12 13 13 # Load the sim time file and extract the seconds */ 14 def getSimTime( ):14 def getSimTime(path): 15 15 global seconds 16 with open ( "webapps/dynamicdata/sim_elapsedtime.json", 'r') as myfile:16 with open (path+"sim_elapsedtime.json", 'r') as myfile: 17 17 jsonData=myfile.read() 18 18 try: … … 37 37 config.read(configdir + '/logging_service.cfg') 38 38 logfilepath = config.get('Paths', 'UnifiedLogPath') 39 39 40 40 # Delete any previously existing output file 41 41 f = open(logfilepath + outputFilename, "w") … … 49 49 setupfunc = getattr(plugmodule, 'setup') 50 50 #Call setup 51 setupfunc( )51 setupfunc(configdir) 52 52 #END LOOP 53 53 … … 55 55 while True: 56 56 # Get simulation time 57 timeStamp = getSimTime( )57 timeStamp = getSimTime(logfilepath) 58 58 # Reset Output Buffer 59 59 output = "" … … 66 66 67 67 # Run the plugin process returning new log entries 68 results = getfunc() 68 results = getfunc() 69 69 # Append simulation time and the log entries to the Output Buffer 70 70 for item in results: … … 87 87 #END DO 88 88 89 # for unit testing89 # Entry point for application 90 90 if __name__ == '__main__': 91 91 startup(sys.argv)
Note: See TracChangeset
for help on using the changeset viewer.
