Changeset 446 in tmcsimulator for trunk/src/python/unifiedlogger/__main__.py


Ignore:
Timestamp:
07/15/2019 02:49:33 PM (7 years ago)
Author:
jdalbey
Message:

Change unifiedlogger to get revision number from a config file instead of application.properties in tmcsim.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/python/unifiedlogger/__main__.py

    r444 r446  
    1 import logging_service, os, get_app_properties 
     1import logging_service, os, ConfigParser 
    22# This main module is provided so the application can be conveniently bundled for deployment 
    33def main(): 
    4     revNum = get_app_properties.getRevision() 
     4    # get revision number from configuration 
     5    config = ConfigParser.ConfigParser() 
     6    config.read('config/application_properties.cfg') 
     7    revNum = config.get('Versions', 'revision_number') 
     8     
    59    print "Unified Logging Service v"+revNum,"starting from ",os.getcwd() 
    610    logging_service.startup() 
Note: See TracChangeset for help on using the changeset viewer.