当前位置: 首页>>代码示例>>Python>>正文


Python Debug.getLogger方法代码示例

本文整理汇总了Python中Debug.getLogger方法的典型用法代码示例。如果您正苦于以下问题:Python Debug.getLogger方法的具体用法?Python Debug.getLogger怎么用?Python Debug.getLogger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Debug的用法示例。


在下文中一共展示了Debug.getLogger方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import getLogger [as 别名]
    def __init__(self):
        # Instantiate Logger
        self.LOGGER = Debug.getLogger("energyathome.datalogger.serialcomm")

        self.COMM = serial.Serial()
        
        # Create Config manager
        self.CONFIG = ConfigManager()
开发者ID:Alwnikrotikz,项目名称:energyathome,代码行数:10,代码来源:SerialComm.py

示例2: __init__

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import getLogger [as 别名]
 def __init__(self):
     # Instantiate Logger
     self.LOGGER = Debug.getLogger("energyathome.datalogger.offlinehandler")
     # Configuration Manager
     self.CONFIG = ConfigManager()
     # Data validation class
     self.VALIDATOR = CheckLiveData()
     # Data trigger class
     self.TRIGGER = CheckLiveTriggers()
开发者ID:Alwnikrotikz,项目名称:energyathome,代码行数:11,代码来源:OfflineHandler.py

示例3: __init__

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import getLogger [as 别名]
 def __init__(self):
     # Instantiate logger
     self.LOGGER = Debug.getLogger("energyathome.datalogger.twitter")
     # Configuration Manager
     self.CONFIG = ConfigManager()
     
     self.LOGGER.debug("Adding to system path: " + os.path.dirname(os.path.abspath(__file__)) + os.sep + "python-twitter")
     sys.path.append(os.path.dirname(os.path.abspath(__file__)) + os.sep + "python-twitter")
     
     currentTime = datetime.now()
     
     self.LAST_HOURLY_POST = currentTime.strftime("%H")
     
     self.TWITTER = __import__("twitter")
开发者ID:Alwnikrotikz,项目名称:energyathome,代码行数:16,代码来源:Twitter.py

示例4: __init__

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import getLogger [as 别名]
 def __init__(self):
     # Instantiate Logger
     self.LOGGER = Debug.getLogger("energyathome.datalogger.xmlparser")
开发者ID:dannytsang,项目名称:energyathome,代码行数:5,代码来源:XMLParser.py

示例5: __init__

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import getLogger [as 别名]
#	but WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#	
#	You should have received a copy of the GNU General Public License
#	along with [email protected]  If not, see <http://www.gnu.org/licenses/>.
#

__author__ = 'Danny Tsang <[email protected]>'

import Debug
from database.MySQL import MySQL
from database.DatabaseException import ConnectionException

# Instantiate Logger
LOGGER = Debug.getLogger("energyathome.datalogger.historicaldata")

# Instantiate DB
DATABASE = MySQL()

# Historical data class used to store device data
class HistoricalData:
    
    def __init__(self):
        # CC name
        self.name = ""
        # Days Since Birth
        self.dsb = 0
        # Time reported by device
        self.time = ""
        # In degrees celcius
开发者ID:Alwnikrotikz,项目名称:energyathome,代码行数:33,代码来源:HistoricalData.py

示例6: __init__

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import getLogger [as 别名]
 def __init__(self):
     # Instantiate config manager
     self.CONFIG = ConfigManager()
     # Get logger instance
     self.LOGGER = Debug.getLogger("energyathome.datalogger.datatrigger")
开发者ID:Alwnikrotikz,项目名称:energyathome,代码行数:7,代码来源:DataTrigger.py

示例7: main

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import getLogger [as 别名]
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#	GNU General Public License for more details.
#	
#	You should have received a copy of the GNU General Public License
#	along with [email protected]  If not, see <http://www.gnu.org/licenses/>.
#

__author__ = 'Danny Tsang <[email protected]>'

import sys

import Debug
import Core

# Instantiate Logger
LOGGER = Debug.getLogger("energyathome.datalogger.main")

def main():
    """Main function which starts the program"""
    
    global LOGGER
    
    LOGGER.info("Starting [email protected]")
    
    try:
        # initialise
        Core.init()
        
        while True:
            # Capture and store data
            Core.run()
开发者ID:Alwnikrotikz,项目名称:energyathome,代码行数:33,代码来源:Main.py

示例8: ConfigManager

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import getLogger [as 别名]
import HistoricalData
import Debug
from database.MySQL import MySQL
from database.DatabaseException import ConnectionException
from config.Config import ConfigManager
from xmlhandler.XMLParser import Parser
from DataValidation import CheckLiveData
from DataTrigger import CheckLiveTriggers
from SerialComm import DeviceManager
from OfflineHandler import BackupRestore

# Configuration Manager
CONFIG = ConfigManager()

# Instantiate Logger
LOGGER = Debug.getLogger("energyathome.datalogger.core")

# Instantiate DB
DATABASE = MySQL()

SCHEDULER = None

# Data validation
VALIDATOR = None

# Data trigger
TRIGGER = None

# Serial Devices
DEVICE = None
开发者ID:Alwnikrotikz,项目名称:energyathome,代码行数:32,代码来源:Core.py


注:本文中的Debug.getLogger方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。