本文整理汇总了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()
示例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()
示例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")
示例4: __init__
# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import getLogger [as 别名]
def __init__(self):
# Instantiate Logger
self.LOGGER = Debug.getLogger("energyathome.datalogger.xmlparser")
示例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
示例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")
示例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()
示例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