當前位置: 首頁>>代碼示例>>Python>>正文


Python PLOG.setlevel方法代碼示例

本文整理匯總了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__)))
開發者ID:zhangqiaoli,項目名稱:pythonTool,代碼行數:18,代碼來源:radiusCheck.py

示例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__)))
開發者ID:zhangqiaoli,項目名稱:pythonTool,代碼行數:20,代碼來源:filecrawler.py

示例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__)))
開發者ID:zhangqiaoli,項目名稱:pythonTool,代碼行數:21,代碼來源:filecrawlerUTF8統一編碼版.py

示例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__))))
開發者ID:zhangqiaoli,項目名稱:pythonTool,代碼行數:23,代碼來源:filecrawler+-+MLSD.py

示例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):
開發者ID:zhangqiaoli,項目名稱:pythonTool,代碼行數:33,代碼來源:PagejumpDemo.py

示例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)
      
    
開發者ID:zhangqiaoli,項目名稱:pythonTool,代碼行數:30,代碼來源:AcctPeakData.py


注:本文中的pysmartac.log.PLOG.setlevel方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。