Ignore:
Timestamp:
08/23/2019 02:21:45 PM (7 years ago)
Author:
jdalbey
Message:

Update actitivylog watcher to obtain path from separate entry in config file. Because in production, the path will be in a separate directory from other log files.

File:
1 edited

Legend:

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

    r478 r479  
    11import json, time, ConfigParser 
    2 from copy import deepcopy 
     2#from copy import deepcopy 
    33 
    44# Incident Activity log Watcher 
     
    2424    config = ConfigParser.ConfigParser() 
    2525    config.read('config/logging_service.cfg') 
    26     logfilepath  = config.get('Paths', 'UnifiedLogPath') 
     26    logfilepath = config.get('Paths', 'ActivityLogPath') 
     27    logfilename = "data.json"   #"IncidentActivity.log" 
     28    lines = [] 
    2729     
    28     lines = [] 
    2930    try: 
    30         json_file = open (logfilepath + "IncidentActivity.log",'r') 
     31        json_file = open (logfilepath + logfilename,'r') 
    3132    except IOError: 
    32         print "Error: missing "+logfilepath+"IncidentActivity.log file." 
     33        print "Error: missing "+logfilepath+logfilename+" file." 
    3334    else: 
    3435        jsonData=json_file.read() 
Note: See TracChangeset for help on using the changeset viewer.