IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33295


Ignore:
Timestamp:
Feb 16, 2012, 3:35:36 PM (14 years ago)
Author:
rhenders
Message:

pid and host are now class variables

File:
1 edited

Legend:

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

    r33259 r33295  
    33import os
    44import sys
     5import socket
    56
    67class PSLogger(logging.getLoggerClass()):
     
    1718       if sendToFile:
    1819
    19            HOST = socket.gethostname()
    20            PID = os.getpid()
     20           self.host = socket.gethostname()
     21           self.pid = os.getpid()
    2122
    2223           # generate path
    2324           PATH = basePath + "/log"
    2425           if not os.path.exists(PATH): os.makedirs(PATH)
    25            FULLPATH = PATH + "/" + name + "_" + dvoLabel + "_" + HOST + "_" + str(PID) + ".log"
     26           FULLPATH = PATH + "/" + name + "_" + dvoLabel + "_" + self.host + "_" + str(self.pid) + ".log"
    2627
    2728           # opens file to be appended
Note: See TracChangeset for help on using the changeset viewer.