本文整理汇总了Python中utils.Util.get_logger方法的典型用法代码示例。如果您正苦于以下问题:Python Util.get_logger方法的具体用法?Python Util.get_logger怎么用?Python Util.get_logger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utils.Util
的用法示例。
在下文中一共展示了Util.get_logger方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _initialize_members
# 需要导入模块: from utils import Util [as 别名]
# 或者: from utils.Util import get_logger [as 别名]
def _initialize_members(self,date,limit,logger):
# get logger if exists. if not, create new instance.
self._logger = logging.getLogger('OA.Flow') if logger else Util.get_logger('OA.Flow',create_file=False)
# initialize required parameters.
self._scrtip_path = os.path.dirname(os.path.abspath(__file__))
self._date = date
self._table_name = "flow"
self._flow_results = []
self._limit = limit
self._data_path = None
self._ipynb_path = None
self._ingest_summary_path = None
self._flow_scores = []
self._results_delimiter = '\t'
# get app configuration.
self._oni_conf = Util.get_oni_conf()
# get scores fields conf
conf_file = "{0}/flow_conf.json".format(self._scrtip_path)
self._conf = json.loads(open (conf_file).read(),object_pairs_hook=OrderedDict)
# initialize data engine
self._db = self._oni_conf.get('conf','DBNAME').replace("'","").replace('"','')
self._engine = Data(self._db, self._table_name,self._logger)
示例2: __init__
# 需要导入模块: from utils import Util [as 别名]
# 或者: from utils.Util import get_logger [as 别名]
def __init__(self,conf,logger=None):
# get logger if exists. if not, create new instance.
self._logger = logging.getLogger('OA.GTI') if logger else Util.get_logger('OA.GTI',create_file=False)
self._gti_rest_client_path = conf['refclient']
self._gti_ci = conf['ci']
self._gti_password = conf['password']
self._gti_user = conf['user']
self._gti_server = conf['server']
self._category_file = conf["category_file"]
self._category_dict = {}
self._load_category_dicts()
示例3: start_oa
# 需要导入模块: from utils import Util [as 别名]
# 或者: from utils.Util import get_logger [as 别名]
def start_oa(args):
# setup the main logger for all the OA process.
logger = Util.get_logger('OA',create_file=False)
logger.info("-------------------- STARTING OA ---------------------")
validate_parameters_values(args,logger)
# create data type instance.
module = __import__("{0}.{0}_oa".format(args.type),fromlist=['OA'])
# start OA.
oa_process = module.OA(args.date,args.limit,logger)
oa_process.start()
示例4: __init__
# 需要导入模块: from utils import Util [as 别名]
# 或者: from utils.Util import get_logger [as 别名]
def __init__(self,config,logger=None):
self._logger = logging.getLogger('OA.IANA') if logger else Util.get_logger('OA.IANA',create_file=False)
if COL_CLASS in config:
self._qclass_file_path = config[COL_CLASS]
if COL_QTYPE in config:
self._qtype_file_path = config[COL_QTYPE]
if COL_RCODE in config:
self._rcode_file_path = config[COL_RCODE]
if COL_PRESP in config:
self._http_rcode_file_path = config[COL_PRESP]
self._qclass_dict = {}
self._qtype_dict = {}
self._rcode_dict = {}
self._http_rcode_dict = {}
self._init_dicts()
示例5: __init__
# 需要导入模块: from utils import Util [as 别名]
# 或者: from utils.Util import get_logger [as 别名]
def __init__(self,db, pipeline,logger=None):
# get logger if exists. if not, create new instance.
self._logger = logging.getLogger('OA.DATA') if logger else Util.get_logger('OA.DATA',create_file=False)
self._initialize_engine(db, pipeline)
示例6: __init__
# 需要导入模块: from utils import Util [as 别名]
# 或者: from utils.Util import get_logger [as 别名]
def __init__(self,file,logger=None):
self._logger = logging.getLogger('OA.GEO') if logger else Util.get_logger('OA.GEO',create_file=False)
self._ip_localization_file = file
self._ip_localization_ranges = self._get_low_ips_in_ranges()