Ignore:
Timestamp:
10/02/2022 10:32:42 AM (4 years ago)
Author:
jdalbey
Message:

logging_service.py, et.al. Revise how it handles a missing CADcomments.log file - just skip the file read but continue. Also update all watchers to use config dir.

File:
1 edited

Legend:

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

    r647 r687  
    3434file1length = 0 
    3535file2length = 0 
     36configdir = "config"  # default dir for production 
    3637 
    3738# Utility functions 
     
    4243# get path to input file from configuration 
    4344def getLogFilePath(): 
     45    global configdir 
    4446    config = ConfigParser.ConfigParser() 
    45     config.read('config/logging_service.cfg') 
     47    config.read(configdir+'/logging_service.cfg') 
    4648    return config.get('Paths', 'ActivityLogPath') 
    4749 
     
    5052# jdalbey 2022.9.1 
    5153def getLogFilenames(): 
     54    global configdir 
    5255    config = ConfigParser.ConfigParser() 
    53     config.read('config/logging_service.cfg') 
     56    config.read(configdir+'/logging_service.cfg') 
    5457    file1 = config.get('Files','ActivityLogDataFilename') 
    5558    file2 = config.get('Files','ActivityLogSummaryFilename') 
     
    124127    return resultList 
    125128 
    126 def setup(): 
    127     # nothing needed for setup 
     129def setup(dir): 
     130    global configdir 
     131    configdir = dir 
    128132    return 
    129133 
    130134# Local main for unit testing 
    131135def main(): 
    132     setup() 
     136    setup("config/devlinux") 
    133137    # Loop Forever, checking every five seconds 
    134138    while True: 
Note: See TracChangeset for help on using the changeset viewer.