Custom LogHandler for the master process of a multi-process job. More...
Custom LogHandler for the master process of a multi-process job.
This is a custom logging Handler class used for multi-process or multi-job batch scripts. It has a higher minimum log level for messages not sent to the jlogfile domain. Also, for every log message, the log file is opened, the message is written and the file is closed. This is done to mimic the postmsg command. Exception information is never sent to the log file.
Public Member Functions | |
def | __init__ (self, logger, jlogdomain, otherlevels, joformat, jformat) |
Custom LogHandler for the master process of a multi-process job. More... | |
def | stringify_record (self, record) |
Convert a log record to a string. More... | |
def | emit (self, record) |
Write a log message. More... | |
def produtil.log.MasterLogHandler.__init__ | ( | self, | |
logger, | |||
jlogdomain, | |||
otherlevels, | |||
joformat, | |||
jformat | |||
) |
Custom LogHandler for the master process of a multi-process job.
This is a custom logging Handler class used for multi-process or multi-job batch scripts. It has a higher minimum log level for messages not sent to the jlogfile domain. Also, for every log message, the log file is opened, the message is written and the file is closed. This is done to mimic the postmsg command. Exception information is never sent to the log file. MasterLogHandler constructor
logger | The logging.Logger for the master process. |
jlogdomain | The logging domain for the jlogfile. |
otherlevels | Log level for any extrema to go to the jlogfile. |
joformat | Log format for other streams. |
jformat | Log format for the jlogfile stream. |
def produtil.log.MasterLogHandler.emit | ( | self, | |
record | |||
) |
def produtil.log.MasterLogHandler.stringify_record | ( | self, | |
record | |||
) |
Convert a log record to a string.
Definition at line 154 of file log.py.
Referenced by produtil.log.MasterLogHandler.emit(), and produtil.log.JLogHandler.emit().