本文整理汇总了Python中pysmartac.log.PLOG.setlevel方法的典型用法代码示例。如果您正苦于以下问题:Python PLOG.setlevel方法的具体用法?Python PLOG.setlevel怎么用?Python PLOG.setlevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pysmartac.log.PLOG
的用法示例。
在下文中一共展示了PLOG.setlevel方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: init
# 需要导入模块: from pysmartac.log import PLOG [as 别名]
# 或者: from pysmartac.log.PLOG import setlevel [as 别名]
def init():
configfile=assistant.SF("%s/radiusCheck.conf"%(os.path.dirname(__file__)))
print os.path.dirname(__file__)
config=pysmartac.configer.openconfiger(configfile)
#configer
conf.logLevel=config.getstr("system","logLevel",conf.logLevel)
conf.clientPath=config.getstr("system","clientPath",conf.clientPath)
conf.logDir=config.getstr("system","logDir",conf.logDir)
conf.radiusIP=config.getstr("system","radiusIP",conf.radiusIP)
conf.reponseTimeout=config.getint("system","reponseTimeout",conf.reponseTimeout)
conf.secret=config.getstr("system","secret",conf.secret)
config.save()
#log settings
PLOG.setlevel(conf.logLevel)
PLOG.enableFilelog("%s/log/RADCK_$(Date8).log"%(os.path.dirname(__file__)))
示例2: init
# 需要导入模块: from pysmartac.log import PLOG [as 别名]
# 或者: from pysmartac.log.PLOG import setlevel [as 别名]
def init():
configfile=assistant.SF("%s/filecrawler.conf"%(os.path.dirname(__file__)))
print os.path.dirname(__file__)
config=pysmartac.configer.openconfiger(configfile)
#configer
conf.logLevel=config.getstr("system","logLevel",conf.logLevel)
conf.httpServerSite=config.getstr("system","httpserversite",conf.httpServerSite)
conf.movieDir=config.getstr("system","movieDir",conf.movieDir)
conf.iosDir=config.getstr("system","iosDir",conf.iosDir)
conf.androidDir=config.getstr("system","androidDir",conf.androidDir)
conf.movieOutputFile=config.getstr("system","movieOutputFile",conf.movieOutputFile)
conf.iosOutputFile=config.getstr("system","iosOutputFile",conf.iosOutputFile)
conf.androidOutputFile=config.getstr("system","androidOutputFile",conf.androidOutputFile)
config.save()
#log settings
PLOG.setlevel(conf.logLevel)
PLOG.enableFilelog("%s/log/FLCRAWLER_$(Date8)_$(filenumber2).log"%(os.path.dirname(__file__)))
示例3: init
# 需要导入模块: from pysmartac.log import PLOG [as 别名]
# 或者: from pysmartac.log.PLOG import setlevel [as 别名]
def init():
configfile=assistant.SF("%s/filecrawler.conf"%(os.path.dirname(__file__)))
print os.path.dirname(__file__)
config=pysmartac.configer.openconfiger(configfile)
#configer
conf.pidfile=config.getstr("system","pidfile",conf.pidfile)
conf.threadCount=config.getint("system","threadCount",conf.threadCount)
conf.logLevel=config.getstr("system","logLevel",conf.logLevel)
conf.httpServerSite=config.getstr("system","httpserversite",conf.httpServerSite)
conf.movieDir=config.getstr("system","movieDir",conf.movieDir)
conf.appDir=config.getstr("system","appDir",conf.appDir)
conf.movieOutputFile=config.getstr("system","movieOutputFile",conf.movieOutputFile)
conf.appOutputFile=config.getstr("system","appOutputFile",conf.appOutputFile)
conf.checkInterval=config.getint("system","checkInterval",conf.checkInterval)
config.save()
#log settings
PLOG.setlevel(conf.logLevel)
PLOG.enableFilelog("%s/log/FLCRAWLER_$(Date8)_$(filenumber2).log"%(os.path.dirname(__file__)))
示例4: init
# 需要导入模块: from pysmartac.log import PLOG [as 别名]
# 或者: from pysmartac.log.PLOG import setlevel [as 别名]
def init():
configfile = assistant.SF("%s/filecrawler.conf" % (os.path.dirname(__file__)))
print os.path.dirname(__file__)
config = pysmartac.configer.openconfiger(configfile)
# configer
conf.pidfile = config.getstr("system", "pidfile", conf.pidfile)
conf.threadCount = config.getint("system", "threadCount", conf.threadCount)
conf.logLevel = config.getstr("system", "logLevel", conf.logLevel)
conf.ftpServerMovieSource = config.getstr("system", "ftpServerMovieSource", conf.ftpServerMovieSource)
conf.ftpServerAppSource = config.getstr("system", "ftpServerAppSource", conf.ftpServerAppSource)
conf.ftpServerUser = config.getstr("system", "ftpServerUser", conf.ftpServerUser)
conf.ftpServerPwd = config.getstr("system", "ftpServerPwd", conf.ftpServerPwd)
conf.ftpJsonOutputPath = config.getstr("system", "ftpJsonOutputPath", conf.ftpJsonOutputPath)
conf.movieOutputFile = config.getstr("system", "movieOutputFile", conf.movieOutputFile)
conf.appOutputFile = config.getstr("system", "appOutputFile", conf.appOutputFile)
conf.checkInterval = config.getint("system", "checkInterval", conf.checkInterval)
config.save()
# log settings
PLOG.setlevel(conf.logLevel)
PLOG.enableFilelog(assistant.SF("%s/log/FLCRAWLER_$(Date8)_$(filenumber2).log" % (os.path.dirname(__file__))))
示例5: HandleSetURI
# 需要导入模块: from pysmartac.log import PLOG [as 别名]
# 或者: from pysmartac.log.PLOG import setlevel [as 别名]
import tornado.websocket
import json
import sys
import pysmartac
import pysmartac.assistant as assistant
from pysmartac.daemon import daemon
from pysmartac.log import PLOG
import datetime
import threading
import uuid
lastpageuri = "file:///E:/PythonCode/ExchangeDemo/websocketA.html"
port = 8888
#log settings
PLOG.setlevel('D')
PLOG.enableFilelog("%s/log/Demo_$(Date8)_$(filenumber2).log"%(os.path.dirname(__file__)))
reload(sys)
sys.setdefaultencoding("utf-8")
def HandleSetURI(uri):
res = {}
res["msgid"] = "setpage"
res["uri"] = uri
jsres = json.dumps(res)
for wsname,ws in WSManager.websockets.items():
ws.write_message(jsres)
class BaseHandler(tornado.web.RequestHandler):
def get_current_user(self):
示例6: print
# 需要导入模块: from pysmartac.log import PLOG [as 别名]
# 或者: from pysmartac.log.PLOG import setlevel [as 别名]
print ("没有输入起始和结束统计时间,默认只统计昨天数据,想要统计特定日期内的数据,请输入起始和结束时间(包含起始日期和结束日期),例如:20150210 20150224")
elif len(sys.argv)>=2 and len(sys.argv)<3:
print ("没有结束统计时间,默认统计至今天(包括今天),想要统计特定日期内的数据,请输入起始和结束时间(包含起始日期和结束日期),例如:20150210 20150224")
startdate=datetime.datetime.strptime(sys.argv[1], '%Y%m%d')
enddate=enddate+datetime.timedelta(days=1)
else:
try:
startdate=datetime.datetime.strptime(sys.argv[1], '%Y%m%d')
enddate=datetime.datetime.strptime(sys.argv[2], '%Y%m%d')+datetime.timedelta(days=1)
except:
print ("输入时间参数解析失败,参数格式不对,例:20150210")
sys.exit(1)
PLOG.enableControllog(False)
PLOG.enableFilelog("%s/log/SARPT_$(Date8)_$(filenumber2).log"%(os.path.dirname(__file__)))
loadconfig()
PLOG.setlevel(SAPeakDataPublic.st.loglevel)
# 加载基础数据,建立区域关系
stopsCentor=SAStopDefine.stopDc
if not stopsCentor.reloadStop():
PLOG.error("加载站点基础数据失败!")
sys.exit(1)
while startdate<enddate:
# 站点天数组数据重置
for stopid,stop in stopsCentor.stops.items():
stop.resetdata()
# 统计startdate当天数据
statisticsCurrentDayData(startdate)
startdate = startdate + datetime.timedelta(days=1)