Ignore:
Timestamp:
07/16/2019 08:05:22 AM (7 years ago)
Author:
jdalbey
Message:

Enhance unified logger to use a placeholder for revision number if config file not found.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/python/unifiedlogger/wing_project.wpr

    r446 r452  
    183183                       'toolbox-percent': 1.0, 
    184184                       'toolbox-tree-sel': ''})], 
    185         'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('get_revision'), 
    186         {'attrib-starts': [], 
    187          'code-line': 'print readFile()', 
     185        'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('__main__.py'), 
     186        {'attrib-starts': [('main|0|', 
     187                            2)], 
     188         'code-line': '    print "revision ",get_app_properties.getRevision('\ 
     189                      ')\n', 
    188190         'first-line': 0L, 
    189191         'folded-linenos': [], 
    190          'sel-line': 15L, 
    191          'sel-line-start': 412L, 
    192          'selection_end': 418L, 
    193          'selection_start': 418L, 
     192         'sel-line': 4L, 
     193         'sel-line-start': 215L, 
     194         'selection_end': 269L, 
     195         'selection_start': 269L, 
    194196         'zoom': 0L}, 
    195         1563130972.859102], 
    196         [loc('logging_service.py'), 
    197          {'attrib-starts': [], 
    198           'code-line': 'import cms_watcher, cad_watcher, time, json, ConfigP'\ 
    199                        'arser, get_revision\n', 
    200           'first-line': 0L, 
    201           'folded-linenos': [], 
    202           'sel-line': 0L, 
    203           'sel-line-start': 0L, 
    204           'selection_end': 71L, 
    205           'selection_start': 71L, 
    206           'zoom': 0L}, 
    207          1563131014.214975], 
    208         [loc('get_revision'), 
    209          {'attrib-starts': [], 
    210           'code-line': '', 
    211           'first-line': 0L, 
    212           'folded-linenos': [], 
    213           'sel-line': 15L, 
    214           'sel-line-start': 415L, 
    215           'selection_end': 415L, 
    216           'selection_start': 415L, 
    217           'zoom': 0L}, 
    218          1563131037.968315], 
    219         [loc('logging_service.py'), 
    220          {'attrib-starts': [], 
    221           'code-line': 'import cms_watcher, cad_watcher, time, json, ConfigP'\ 
    222                        'arser, get_revision\n', 
    223           'first-line': 0L, 
    224           'folded-linenos': [], 
    225           'sel-line': 0L, 
    226           'sel-line-start': 0L, 
    227           'selection_end': 71L, 
    228           'selection_start': 71L, 
    229           'zoom': 0L}, 
    230          1563131045.946787], 
    231         [loc('get_revision'), 
    232          {'attrib-starts': [], 
    233           'code-line': '', 
    234           'first-line': 0L, 
    235           'folded-linenos': [], 
    236           'sel-line': 18L, 
    237           'sel-line-start': 455L, 
    238           'selection_end': 455L, 
    239           'selection_start': 455L, 
    240           'zoom': 0L}, 
    241          1563131163.18444], 
    242         [loc('logging_service.py'), 
    243          {'attrib-starts': [], 
    244           'code-line': 'import cms_watcher, cad_watcher, time, json, ConfigP'\ 
    245                        'arser, get_revision\n', 
    246           'first-line': 0L, 
    247           'folded-linenos': [], 
    248           'sel-line': 0L, 
    249           'sel-line-start': 0L, 
    250           'selection_end': 71L, 
    251           'selection_start': 71L, 
    252           'zoom': 0L}, 
    253          1563131223.451037], 
    254         [loc('get_app_properties.py'), 
    255          {'attrib-starts': [('getRevision|0|', 
    256                              14)], 
    257           'code-line': 'def getRevision(lines):\n', 
    258           'first-line': 0L, 
    259           'folded-linenos': [], 
    260           'sel-line': 14L, 
    261           'sel-line-start': 370L, 
    262           'selection_end': 385L, 
    263           'selection_start': 374L, 
    264           'zoom': 0L}, 
    265          1563131232.527418], 
    266         [loc('logging_service.py'), 
    267          {'attrib-starts': [('startup|0|', 
    268                              17)], 
    269           'code-line': 'def startup():\n', 
    270           'first-line': 7L, 
    271           'folded-linenos': [], 
    272           'sel-line': 17L, 
    273           'sel-line-start': 533L, 
    274           'selection_end': 547L, 
    275           'selection_start': 547L, 
    276           'zoom': 0L}, 
    277          1563131266.147045], 
    278         [loc('__main__.py'), 
    279          {'attrib-starts': [('main|0|', 
    280                              2)], 
    281           'code-line': '    print "revision ",get_app_properties.getRevision'\ 
    282                        '()\n', 
    283           'first-line': 0L, 
    284           'folded-linenos': [], 
    285           'sel-line': 4L, 
    286           'sel-line-start': 215L, 
    287           'selection_end': 269L, 
    288           'selection_start': 269L, 
    289           'zoom': 0L}, 
    290          1563131297.40217], 
     197        1563131297.40217], 
    291198        [loc('logging_service.py'), 
    292199         {'attrib-starts': [], 
     
    422329          'selection_start': 42L, 
    423330          'zoom': 0L}, 
    424          1563232919.766056]], 
     331         1563232919.766056], 
     332        [loc('__main__.py'), 
     333         {'attrib-starts': [('main|0|', 
     334                             2)], 
     335          'code-line': "    config.read('config/application_properties.cf')"\ 
     336                       "\n", 
     337          'first-line': 0L, 
     338          'folded-linenos': [], 
     339          'sel-line': 5L, 
     340          'sel-line-start': 232L, 
     341          'selection_end': 281L, 
     342          'selection_start': 281L, 
     343          'zoom': 0L}, 
     344         1563294795.82432], 
     345        [loc('../../../../../../../../usr/lib/python2.7/ConfigParser.py'), 
     346         {'attrib-starts': [('ConfigParser|0|', 
     347                             85), 
     348                            ('ConfigParser|0|.get|0|', 
     349                             589)], 
     350          'code-line': '                raise NoSectionError(section)\n', 
     351          'first-line': 601L, 
     352          'folded-linenos': [], 
     353          'sel-line': 606L, 
     354          'sel-line-start': 22028L, 
     355          'selection_end': 22028L, 
     356          'selection_start': 22028L, 
     357          'zoom': 0L}, 
     358         1563294818.055248], 
     359        [loc('__main__.py'), 
     360         {'attrib-starts': [('main|0|', 
     361                             2)], 
     362          'code-line': '    except:  # If config file not found, use a quest'\ 
     363                       'ion mark placeholder \n', 
     364          'first-line': 0L, 
     365          'folded-linenos': [], 
     366          'sel-line': 8L, 
     367          'sel-line-start': 356L, 
     368          'selection_end': 417L, 
     369          'selection_start': 417L, 
     370          'zoom': 0L}, 
     371         1563294949.099012], 
     372        [loc('logging_service.py'), 
     373         {'attrib-starts': [('startup|0|', 
     374                             17)], 
     375          'code-line': 'def startup():\n', 
     376          'first-line': 12L, 
     377          'folded-linenos': [], 
     378          'sel-line': 17L, 
     379          'sel-line-start': 513L, 
     380          'selection_end': 527L, 
     381          'selection_start': 527L, 
     382          'zoom': 0L}, 
     383         1563295110.747974], 
     384        [loc('get_app_properties.py'), 
     385         {'attrib-starts': [], 
     386          'code-line': '', 
     387          'first-line': 0L, 
     388          'folded-linenos': [], 
     389          'sel-line': 0L, 
     390          'sel-line-start': 0L, 
     391          'selection_end': 0L, 
     392          'selection_start': 0L, 
     393          'zoom': 0L}, 
     394         1563295114.739899], 
     395        [loc('logging_service.py'), 
     396         {'attrib-starts': [('startup|0|', 
     397                             17)], 
     398          'code-line': 'def startup():\n', 
     399          'first-line': 12L, 
     400          'folded-linenos': [], 
     401          'sel-line': 17L, 
     402          'sel-line-start': 513L, 
     403          'selection_end': 527L, 
     404          'selection_start': 527L, 
     405          'zoom': 0L}, 
     406         1563295120.252652], 
     407        [loc('../../../../../../../../usr/lib/python2.7/ConfigParser.py'), 
     408         {'attrib-starts': [('ConfigParser|0|', 
     409                             85), 
     410                            ('ConfigParser|0|.get|0|', 
     411                             589)], 
     412          'code-line': '                raise NoSectionError(section)\n', 
     413          'first-line': 601L, 
     414          'folded-linenos': [], 
     415          'sel-line': 606L, 
     416          'sel-line-start': 22028L, 
     417          'selection_end': 22028L, 
     418          'selection_start': 22028L, 
     419          'zoom': 0L}, 
     420         1563295122.349933], 
     421        [loc('logging_service.py'), 
     422         {'attrib-starts': [('startup|0|', 
     423                             17)], 
     424          'code-line': 'def startup():\n', 
     425          'first-line': 12L, 
     426          'folded-linenos': [], 
     427          'sel-line': 17L, 
     428          'sel-line-start': 513L, 
     429          'selection_end': 527L, 
     430          'selection_start': 527L, 
     431          'zoom': 0L}, 
     432         1563295126.806403]], 
    425433        20), 
    426434        'current-loc': loc('__main__.py'), 
     
    447455                                'selection_start': 353L, 
    448456                                'zoom': 0L}), 
    449                               (loc('get_app_properties.py'), 
    450                                {'attrib-starts': [], 
    451                                 'code-line': '# Obsolete - moved to config f'\ 
    452         'ile instead.\n', 
    453                                 'first-line': 0L, 
    454                                 'folded-linenos': [], 
    455                                 'sel-line': 0L, 
    456                                 'sel-line-start': 0L, 
    457                                 'selection_end': 42L, 
    458                                 'selection_start': 42L, 
    459                                 'zoom': 0L}), 
    460457                              (loc('logging_service.py'), 
    461458                               {'attrib-starts': [('startup|0|', 
    462459        17)], 
    463                                 'code-line': '    # get path to output file '\ 
    464         'from configuration\n', 
    465                                 'first-line': 9L, 
     460                                'code-line': 'def startup():\n', 
     461                                'first-line': 12L, 
    466462                                'folded-linenos': [], 
    467                                 'sel-line': 18L, 
    468                                 'sel-line-start': 528L, 
    469                                 'selection_end': 721L, 
    470                                 'selection_start': 528L, 
     463                                'sel-line': 17L, 
     464                                'sel-line-start': 513L, 
     465                                'selection_end': 527L, 
     466                                'selection_start': 527L, 
    471467                                'zoom': 0L}), 
    472468                              (loc('__main__.py'), 
    473469                               {'attrib-starts': [('main|0|', 
    474470        2)], 
    475                                 'code-line': '    \n', 
     471                                'code-line': '    except:  # If config file '\ 
     472        'not found, use a question mark placeholder \n', 
    476473                                'first-line': 0L, 
    477474                                'folded-linenos': [], 
    478                                 'sel-line': 7L, 
    479                                 'sel-line-start': 340L, 
    480                                 'selection_end': 344L, 
    481                                 'selection_start': 344L, 
     475                                'sel-line': 8L, 
     476                                'sel-line-start': 356L, 
     477                                'selection_end': 417L, 
     478                                'selection_start': 417L, 
    482479                                'zoom': 0L})], 
    483480        'has-focus': True, 
     
    485482        [loc('cad_watcher.py'), 
    486483         loc('cms_watcher.py'), 
    487          loc('get_app_properties.py'), 
    488484         loc('logging_service.py'), 
    489485         loc('__main__.py')]), 
     
    491487        u'cms_watcher.py', 
    492488        u'logging_service.py', 
    493         u'get_app_properties.py', 
    494489        u'__main__.py']}, 
    495490        'saved_notebook_display': None, 
     
    499494        'traversal_pos': ((0, 
    500495                           3), 
    501                           1563232857.216172), 
     496                          1563294795.772892), 
    502497        'user_data': {}}, 
    503498                 'saved_notebook_display': None, 
     
    507502                 'traversal_pos': ((0, 
    508503                                    4), 
    509                                    1563232923.341114), 
     504                                   1563295152.502479), 
    510505                 'user_data': {}}, 
    511506        'window-alloc': (29, 
     
    514509                         722)}]} 
    515510guimgr.recent-documents = [loc('__main__.py'), 
    516                            loc('get_app_properties.py'), 
    517511                           loc('logging_service.py'), 
    518512                           loc('cad_watcher.py'), 
    519513                           loc('cms_watcher.py')] 
    520 guimgr.visual-state = {loc('get_revision'): {'attrib-starts': [], 
     514guimgr.visual-state = {loc('get_app_properties.py'): {'attrib-starts': [], 
     515        'code-line': '', 
     516        'first-line': 0L, 
     517        'folded-linenos': [], 
     518        'sel-line': 0L, 
     519        'sel-line-start': 0L, 
     520        'selection_end': 0L, 
     521        'selection_start': 0L, 
     522        'zoom': 0L}, 
     523                       loc('get_revision'): {'attrib-starts': [], 
    521524        'code-line': '', 
    522525        'first-line': 0L, 
     
    539542        'selection_end': 22028L, 
    540543        'selection_start': 22028L, 
     544        'zoom': 0L}, 
     545                       loc('../../../../../../../../usr/lib/python2.7/ConfigParser.py'): {'a'\ 
     546        'ttrib-starts': [('ConfigParser|0|', 
     547                          85), 
     548                         ('ConfigParser|0|.get|0|', 
     549                          589)], 
     550        'code-line': '                raise NoSectionError(section)\n', 
     551        'first-line': 601L, 
     552        'folded-linenos': [], 
     553        'sel-line': 606L, 
     554        'sel-line-start': 22028L, 
     555        'selection_end': 22028L, 
     556        'selection_start': 22028L, 
    541557        'zoom': 0L}} 
    542558proj.build-cmd = {None: ('default', 
Note: See TracChangeset for help on using the changeset viewer.