本文整理汇总了Python中savanna.openstack.common.log.getLogger函数的典型用法代码示例。如果您正苦于以下问题:Python getLogger函数的具体用法?Python getLogger怎么用?Python getLogger使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLogger函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: notify
def notify(_context, message):
"""Notifies the recipient of the desired event given the model.
Log notifications using OpenStack's default logging system.
"""
priority = message.get("priority", CONF.default_notification_level)
priority = priority.lower()
logger = logging.getLogger("savanna.openstack.common.notification.%s" % message["event_type"])
getattr(logger, priority)(jsonutils.dumps(message))
开发者ID:hanjinze,项目名称:savanna,代码行数:10,代码来源:log_notifier.py
示例2: _sighup_supported
import time
import eventlet
from eventlet import event
from oslo.config import cfg
from savanna.openstack.common import eventlet_backdoor
from savanna.openstack.common.gettextutils import _ # noqa
from savanna.openstack.common import importutils
from savanna.openstack.common import log as logging
from savanna.openstack.common import threadgroup
rpc = importutils.try_import('savanna.openstack.common.rpc')
CONF = cfg.CONF
LOG = logging.getLogger(__name__)
def _sighup_supported():
return hasattr(signal, 'SIGHUP')
def _is_sighup(signo):
return _sighup_supported() and signo == signal.SIGHUP
def _signo_to_signame(signo):
signals = {signal.SIGTERM: 'SIGTERM',
signal.SIGINT: 'SIGINT'}
if _sighup_supported():
signals[signal.SIGHUP] = 'SIGHUP'
开发者ID:rrader,项目名称:savanna,代码行数:31,代码来源:service.py
注:本文中的savanna.openstack.common.log.getLogger函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论