Example #1
0
    def test_success_info(self):
        mode = INFO
        self._log2 = log.myLogger(mode, __name__ + ".B", self._filename)

        self._log2.debug("output debug log! pt1")
        self._log2.info("output info log! pt1")
        self._log2.debug("output debug log! pt2")
        print "log2 parent is"
        print self._log2._log.parent
Example #2
0
    def test_success_all(self):
        mode = DEBUG
        self._log = log.myLogger(mode, __name__ + ".A", self._filename)

        self._log.debug("output debug log! pt1")
        self._log.info("output info log! pt1")
        self._log.debug("output info log! pt2")

        print self._log._log.parent
Example #3
0
    def test_success_info(self):
        mode = INFO
        self._log2 = log.myLogger(mode,__name__ + ".B",self._filename)

        self._log2.debug("output debug log! pt1")
        self._log2.info("output info log! pt1")
        self._log2.debug("output debug log! pt2")
        print "log2 parent is"
        print self._log2._log.parent
Example #4
0
    def test_success_all(self):
        mode = DEBUG
        self._log = log.myLogger(mode,__name__ + ".A",self._filename)

        self._log.debug("output debug log! pt1")
        self._log.info("output info log! pt1")
        self._log.debug("output info log! pt2")

        print self._log._log.parent
Example #5
0
    def test_success_info2(self):
        mode = DEBUG
        self._log3 = log.myLogger(mode, __name__ + ".C", self._filename)

        self._log3.debug("output debug log! pt10")
        self._log3.info("output info log! pt10")
        self._log3.debug("output debug log! pt20")

        print "loge parent is"
        print self._log3._log.parent
Example #6
0
    def test_success_info2(self):
        mode = DEBUG
        self._log3 = log.myLogger(mode,__name__ + ".C",self._filename)

        self._log3.debug("output debug log! pt10")
        self._log3.info("output info log! pt10")
        self._log3.debug("output debug log! pt20")


        print "loge parent is"
        print self._log3._log.parent
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time    : 2018-11-08 11:18
# @Author  : Yangzan
# @File    : main.py

import time
import log
import traceback
import configLoad
import satelliteFlow
import database

#初始化log对象
logger = log.myLogger('log')
logger.info('程序启动')

localtime = time.localtime(time.time())
localhour = localtime.tm_hour
localmin = localtime.tm_min
localsec = localtime.tm_sec
#每六小时进行一次查询
while True:
    #只有整点进行查询
    if localhour % 11 == 0 and localmin == 21 and localsec >= 0 and localsec <= 50:
        # 读取配置文件信息
        config = configLoad.getConfig(logger)
        print(config)
        dbhost = config[15]
        dbport = config[16]
        db = config[17]