16 import logging.config
as lconfig
23 msg = logging.getLogger(
'PyJobTransforms')
27 stdLogLevels = {
'DEBUG' : logging.DEBUG,
28 'VERBOSE' : logging.DEBUG,
29 'INFO' : logging.INFO,
30 'WARNING' : logging.WARNING,
31 'ERROR' : logging.ERROR,
32 'CRITICAL' : logging.CRITICAL,
33 'FATAL' : logging.CRITICAL,
34 'CATASTROPHE' : logging.CRITICAL+10,
39 stdLogLevelsByCritcality = [
'FATAL',
'CRITICAL',
'ERROR',
'WARNING',
'INFO',
'VERBOSE',
'DEBUG']
43 if 'TRF_LOGCONF' in os.environ
and os.access(os.environ[
'TRF_LOGCONF'], os.R_OK):
44 lconfig.fileConfig(os.environ[
'TRF_LOGCONF'])
47 hdlr = logging.StreamHandler(sys.stdout)
49 frmt = logging.Formatter(
"%(name)s.%(funcName)s %(asctime)s %(levelname)s %(message)s")
51 hdlr.setFormatter(frmt)
53 msg.setLevel(logging.INFO)