本文整理汇总了Python中snslog.SNSLog.init方法的典型用法代码示例。如果您正苦于以下问题:Python SNSLog.init方法的具体用法?Python SNSLog.init怎么用?Python SNSLog.init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类snslog.SNSLog
的用法示例。
在下文中一共展示了SNSLog.init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from snslog import SNSLog [as 别名]
# 或者: from snslog.SNSLog import init [as 别名]
#SNSAPI_LOG_INIT_LOGFILE = "snsapi.log"
SNSAPI_LOG_INIT_LOGFILE = None
'''
* None: Output to STDOUT. Good for Debug version.
* {Filename}: Log to {Filename}. Good for Relase version.
'''
def __init__(self, arg):
raise
class SNSConfNoInstantiation(Exception):
"""
This exception is used to make sure you do not
instantiate SNSConf class.
"""
def __init__(self):
super(SNSConfNoInstantiation, self).__init__()
def __str__(self):
return "You can not instantiate SNSConf. "\
"Call its static methods directly!"
# ========== Init Operations =================
SNSLog.init(level = SNSConf.SNSAPI_LOG_INIT_LEVEL, \
logfile = SNSConf.SNSAPI_LOG_INIT_LOGFILE, \
verbose = SNSConf.SNSAPI_LOG_INIT_VERBOSE)