IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33349 for trunk/ippToPsps


Ignore:
Timestamp:
Feb 23, 2012, 4:12:51 PM (14 years ago)
Author:
rhenders
Message:

now using config name rather than DVO label in log name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/pslogger.py

    r33295 r33349  
    1111   This will default to stout and no file output
    1212   '''
    13    def setup(self, name, basePath, dvoLabel, stdout=1, sendToFile=0):
     13   def setup(self, programName, basePath, configName, host, pid, stdout=1, sendToFile=0):
    1414
    1515       formatter = logging.Formatter('%(asctime)s | %(levelname)7s | %(message)s', '%Y-%m-%d %H:%M:%S')
     
    1818       if sendToFile:
    1919
    20            self.host = socket.gethostname()
    21            self.pid = os.getpid()
    22 
    2320           # generate path
    2421           PATH = basePath + "/log"
    2522           if not os.path.exists(PATH): os.makedirs(PATH)
    26            FULLPATH = PATH + "/" + name + "_" + dvoLabel + "_" + self.host + "_" + str(self.pid) + ".log"
    27 
     23           FULLPATH = PATH + "/" + programName + "_" + configName + "_" + host + "_" + str(pid) + ".log"
    2824           # opens file to be appended
    2925           hdlr = logging.FileHandler(FULLPATH, "a")
Note: See TracChangeset for help on using the changeset viewer.