本文整理汇总了Python中Modules.Computer.logging_pyh.getLogger函数的典型用法代码示例。如果您正苦于以下问题:Python getLogger函数的具体用法?Python getLogger怎么用?Python getLogger使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLogger函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: Xml
@summary: Handle the location information for a house.
There is location information for the house. This is for calculating the
time of sunrise and sunset. Additional calculations may be added such
moon rise, tides, etc.
"""
# Import system type stuff
import xml.etree.ElementTree as ET
# Import PyMh files
from Modules.Core.data_objects import LocationData, RiseSetData
from Modules.Core.Utilities.xml_tools import PutGetXML
from Modules.Computer import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.Location ')
class Xml(object):
"""Use the internal data to read / write an updated XML config file.
"""
@staticmethod
def read_location_xml(p_pyhouse_obj):
"""
@param p_house_xml: is the config file xml for a house.
"""
l_obj = LocationData()
l_obj.RiseSet = RiseSetData()
p_pyhouse_obj.House.Location = l_obj
try:
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:31,代码来源:location.py
示例2: Utility
"""
__updated__ = '2017-03-26'
# Import system type stuff
import xml.etree.ElementTree as ET
# Import PyHouse files
from Modules.Core.data_objects import ButtonData
from Modules.Families.family_utils import FamUtil
from Modules.Computer import logging_pyh as Logging
from Modules.Core.Utilities.device_tools import XML as deviceXML
# from Modules.Core.Utilities.xml_tools import PutGetXML, XmlConfigTools
LOG = Logging.getLogger('PyHouse.LightingButton ')
""" Data
x_pyhouse_obj.House.Lighting.Buttons.
BaseUUIDObject
DeviceObject
"""
class Utility(object):
@staticmethod
def _read_base_device(p_pyhouse_obj, p_xml):
"""
@param p_xml: is the XML Element for the entire device
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:30,代码来源:lighting_buttons.py
示例3: LoadXml
__updated__ = '2018-10-17'
__version_info__ = (18, 10, 1)
__version__ = '.'.join(map(str, __version_info__))
# Import system type stuff
import xml.etree.ElementTree as ET
# Import PyMh files and modules.
from Modules.Housing.Entertainment.entertainment_data import \
EntertainmentData, \
EntertainmentPluginData, \
EntertainmentDeviceControl
from Modules.Core.Utilities.xml_tools import XmlConfigTools # , PutGetXML
# from Modules.Core.Utilities.debug_tools import PrettyFormatAny
from Modules.Computer import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.EntertainXML ')
class XML:
"""
"""
def LoadXml(self, p_pyhouse_obj):
""" Read the entertainment section.
Everything present in the XML must be read into the pyhouse_obj structure.
SubSections not active will not be loaded or instantiated.
If a subsection is available, load its module and let it read the xml for itself.
@return: the Entertainment object of PyHouse_obj
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:31,代码来源:entertainment_xml.py
示例4: NodeMessage
@date: Created on Apr 27, 2016
@licencse: MIT License
@summary: Sync the nodes between all nodes.
"""
__updated__ = '2018-07-14'
# Import system type stuff
import datetime
# Import PyMh files and modules.
from Modules.Core.data_objects import NodeData
from Modules.Core.Utilities.debug_tools import PrettyFormatAny
from Modules.Computer import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.NodeSync ')
MINUTES = 60
HOURS = MINUTES * 60
INITIAL_DELAY = 15
REPEAT_DELAY = 4 * HOURS
TOPIC = 'computer/node/'
class NodeMessage():
"""
"""
class Util(object):
"""
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:31,代码来源:node_sync.py
示例5: gen_ts
from Modules.Core.Utilities.convert import long_to_str
__updated__ = '2018-02-10'
# Import system type stuff
import jsonpickle
from queue import Queue
import time
from twisted.web.client import Agent
from twisted.web.http_headers import Headers
from twisted.internet.defer import Deferred
from twisted.internet.protocol import Protocol
# Import PyMh files
from Modules.Computer import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.Hue_Hub ')
SEND_TIMEOUT = 0.8
mac = [ '00', '17', '88', '10', '22', '01' ]
uid = '2f402f80-da50-11e1-9b23-%s' % ''.join(mac)
icon = 'hue.png'
description_xml = 'description.xml'
lights = []
username = "83b7780291a6ceffbe0bd049104df"
devicetype = "something"
portalservices = False
def gen_ts():
return time.strftime('%Y-%m-%dT%H:%M:%S')
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:30,代码来源:Hue_hub.py
示例6: Utility
@contact: [email protected]
@copyright: (c) 2017-2018 by D. Brian Kimmel
@note: Created on Jan 9, 2017
@license: MIT License
@summary:
"""
__updated__ = '2018-03-26'
# Import system type stuff
import xml.etree.ElementTree as ET
# Import PyMh files and modules.
from Modules.Computer import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.Communication ')
class Utility(object):
def read_xml(self, p_pyhouse_obj):
"""Read all the information.
"""
self.m_count = 0
l_dict = {}
try:
_l_xml = p_pyhouse_obj.Xml.XmlRoot.find('ComputerDivision').find('CommunicationSection')
except AttributeError as e_err:
LOG.error('ERROR in read_xml() - {}'.format(e_err))
return l_dict
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:30,代码来源:communication.py
示例7: Xml
Reading the interface stuffs the interface XML data into the controller object.
"""
# Import system type stuff
# Import PyMh files
from Modules.Drivers.Ethernet.Ethernet_xml import XML as ethernetXML
from Modules.Drivers.Null.Null_xml import XML as nullXML
from Modules.Drivers.Serial.Serial_xml import XML as serialXML
from Modules.Drivers.USB.USB_xml import XML as usbXML
from Modules.Core.Utilities.xml_tools import stuff_new_attrs
from Modules.Computer import logging_pyh as Logging
# from Modules.Drivers import VALID_INTERFACES
# from Modules.Drivers import VALID_PROTOCOLS
LOG = Logging.getLogger('PyHouse.Interface ')
class Xml(object):
"""Read and write the interface information based in the interface type.
"""
@staticmethod
def read_interface_xml(p_controller_obj, p_controller_xml):
"""Update the controller object by extracting the passed in XML.
This is basically a dispatcher.
@param p_controller_obj: This is the object we are going to stuff the interface info into.
"""
if p_controller_obj.InterfaceType == 'Ethernet':
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:31,代码来源:interface.py
示例8: MqttActions
__updated__ = '2018-07-16'
# Import system type stuff
import xml.etree.ElementTree as ET
# Import PyMh files
from Modules.Core.data_objects import UuidData, GarageDoorData, MotionSensorData, SecurityData
from Modules.Families.family_utils import FamUtil
from Modules.Housing.Security.pi_camera import API as cameraApi
from Modules.Core.Utilities.device_tools import XML as deviceXML
from Modules.Core.Utilities.uuid_tools import Uuid as UtilUuid
from Modules.Core.Utilities.xml_tools import PutGetXML
from Modules.Core.Utilities.debug_tools import PrettyFormatAny
from Modules.Computer import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.Security ')
# LOCATION = House.Security
class MqttActions(object):
"""
"""
def __init__(self, p_pyhouse_obj):
self.m_pyhouse_obj = p_pyhouse_obj
def _get_field(self, p_message, p_field):
try:
l_ret = p_message[p_field]
except KeyError:
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:30,代码来源:security.py
示例9: ConfigMenuElement
@Summary:
"""
__updated__ = '2017-01-20'
# Import system type stuff
import os
from nevow import loaders
from nevow import athena
# Import PyMh files and modules.
from Modules.Computer import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.webCfgMenu ')
# Handy helper for finding external resources nearby.
webpath = os.path.join(os.path.split(__file__)[0])
templatepath = os.path.join(webpath, 'template')
class ConfigMenuElement(athena.LiveElement):
"""
"""
docFactory = loaders.xmlfile(os.path.join(templatepath, 'configMenuElement.html'))
jsClass = u'configMenu.ConfigMenuWidget'
def __init__(self, p_workspace_obj, p_params):
self.m_workspace_obj = p_workspace_obj
self.m_pyhouse_obj = p_workspace_obj.m_pyhouse_obj
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:31,代码来源:web_configMenu.py
示例10: State
@contact: [email protected]
@copyright: (c) 2018-2018 by D. Brian Kimmel
@license: MIT License
@note: Created Jul 23, 2018
@Summary:
"""
__updated__ = '2018-07-23'
# Import system type stuff
# Import PyMh files and modules.
from Modules.Computer import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.State ')
class State(object):
UNKNOWN = 'unknown'
OCCUPIED = 'occupied'
VACANT = 'vacant'
ON = 'on'
OFF = 'off'
MOTION = 'motion'
STILL = 'still'
OPEN = 'open'
CLOSED = 'closed'
# ## END DBK
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:30,代码来源:state.py
示例11:
# Import system type stuff
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
import subprocess
import os
import time
from datetime import datetime
# from PIL import Image
# Import PyMh files
from Modules.Computer import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.SecurityCamera ')
FRAME_INTERVAL = 1000 # mili-seconds
MIN_PIXELS = 25
THRESHOLD = 10
SENSITIVITY = 20
forceCapture = True
forceCaptureTime = 60 * 60 # Once an hour
# File settings
saveWidth = 1280
saveHeight = 960
diskSpaceToReserve = 400 * 1024 * 1024 # Keep 400 mb free on disk
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:30,代码来源:pi_camera.py
示例12: Xml
@note: Created on Jun 29, 2015
@Summary:
"""
__updated__ = '2018-02-13'
# Import system type stuff
import xml.etree.ElementTree as ET
# Import PyMh files
from Modules.Housing.Pool.pool_data import PoolData
from Modules.Core.Utilities.xml_tools import PutGetXML, XmlConfigTools
from Modules.Computer import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.Pool ')
class Xml(object):
@staticmethod
def _read_base(p_pool_element):
l_pool_obj = PoolData()
XmlConfigTools.read_base_UUID_object_xml(l_pool_obj, p_pool_element)
return l_pool_obj
@staticmethod
def _write_base(p_obj):
l_entry = XmlConfigTools.write_base_UUID_object_xml('Pool', p_obj)
return l_entry
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:30,代码来源:pool.py
示例13: Xml
Logins
Port
SecurePort
"""
__updated__ = '2018-01-27'
# Import system type stuff
import xml.etree.ElementTree as ET
# Import PyMh files and modules.
from Modules.Computer import logging_pyh as Logger
from Modules.Core.data_objects import LoginData, WebData
from Modules.Core.Utilities.uuid_tools import Uuid
from Modules.Core.Utilities.xml_tools import PutGetXML, XmlConfigTools
LOG = Logger.getLogger('PyHouse.WebXml ')
class Xml(object):
"""
"""
@staticmethod
def _read_ports(p_xml):
"""
@param p_xml: is the web section
@return: the Port Number
"""
l_port = PutGetXML.get_int_from_xml(p_xml, 'WebPort', 8580)
l_secure = PutGetXML.get_int_from_xml(p_xml, 'SecurePort', 8580)
l_socket = PutGetXML.get_int_from_xml(p_xml, 'SocketPort', 8580)
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:31,代码来源:web_xml.py
注:本文中的Modules.Computer.logging_pyh.getLogger函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论