本文整理汇总了Python中logger_factory.EspaLogging.configure_base_logger方法的典型用法代码示例。如果您正苦于以下问题:Python EspaLogging.configure_base_logger方法的具体用法?Python EspaLogging.configure_base_logger怎么用?Python EspaLogging.configure_base_logger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类logger_factory.EspaLogging
的用法示例。
在下文中一共展示了EspaLogging.configure_base_logger方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ArgumentParser
# 需要导入模块: from logger_factory import EspaLogging [as 别名]
# 或者: from logger_factory.EspaLogging import configure_base_logger [as 别名]
# Reset back to the base logger
logger = EspaLogging.get_logger('base')
# END - for line in STDIN
# ============================================================================
if __name__ == '__main__':
'''
Description:
Some parameter and logging setup, then call the process routine.
'''
# Grab our only command line parameter
parser = ArgumentParser(
description="Processes a list of scenes from stdin")
parser.add_argument('--keep-log', action='store_true', dest='keep_log',
default=False, help="keep the generated log file")
args = parser.parse_args()
EspaLogging.configure_base_logger(filename=MAPPER_LOG_FILENAME)
# Initially set to the base logger
logger = EspaLogging.get_logger('base')
try:
process(args)
except Exception:
logger.exception("Processing failed stacktrace follows")
sys.exit(0)
示例2: ArgumentParser
# 需要导入模块: from logger_factory import EspaLogging [as 别名]
# 或者: from logger_factory.EspaLogging import configure_base_logger [as 别名]
except Exception:
logger.exception("Exception encountered stacktrace"
" follows")
# END - for line in STDIN
# ============================================================================
if __name__ == '__main__':
'''
Description:
Some parameter and logging setup, then call the process routine.
'''
# Grab our only command line parameter
parser = ArgumentParser(
description="Processes a list of scenes from stdin")
parser.add_argument('--keep-log', action='store_true', dest='keep_log',
default=False, help="keep the generated log file")
args = parser.parse_args()
EspaLogging.configure_base_logger(filename='/tmp/espa-ondemand-mapper.log')
# Initially set to the base logger
logger = EspaLogging.get_logger('base')
try:
process(args)
except Exception:
logger.exception("Processing failed stacktrace follows")
sys.exit(0)