• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python log.getLogger函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中mistral.openstack.common.log.getLogger函数的典型用法代码示例。如果您正苦于以下问题:Python getLogger函数的具体用法?Python getLogger怎么用?Python getLogger使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: TODO

# limitations under the License.

import mock
from oslo.config import cfg

from mistral.actions import std_actions
from mistral.db import api as db_api
from mistral import engine
from mistral.engine.drivers.default import engine as concrete_engine
from mistral.engine import states
from mistral import expressions
from mistral.openstack.common import log as logging
from mistral.tests import base


LOG = logging.getLogger(__name__)

WB_NAME = "my_workbook"
CONTEXT = None  # TODO(rakhmerov): Use a meaningful value.

# Use the set_default method to set value otherwise in certain test cases
# the change in value is not permanent.
cfg.CONF.set_default('auth_enable', False, group='pecan')

# TODO(rakhmerov): add more tests for errors, execution stop etc.


@mock.patch.object(
    engine.EngineClient, 'start_workflow_execution',
    mock.MagicMock(side_effect=base.EngineTestCase.mock_start_workflow))
@mock.patch.object(
开发者ID:lcostantino,项目名称:mistral,代码行数:31,代码来源:test_engine.py


示例2: get_task_runtime

#        http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.

from oslo.config import cfg

from mistral.engine import states
from mistral import expressions
from mistral.openstack.common import log as logging


WORKFLOW_TRACE = logging.getLogger(cfg.CONF.workflow_trace_log_name)


def get_task_runtime(task_spec, state=states.IDLE, outbound_context=None,
                     task_runtime_context=None):
    """Computes the state and exec_flow_context runtime properties for a task
    based on the supplied properties. This method takes the retry nature of a
    task into consideration.

    :param task_spec: specification of the task
    :param state: suggested next state
    :param outbound_context: outbound_context to be used for computation
    :param task_runtime_context: current flow context
    :return: state, exec_flow_context tuple. Sample scenarios are,
    1. state = SUCCESS
       No need to move to next iteration.
开发者ID:dshulyak,项目名称:mistral,代码行数:31,代码来源:retry.py


示例3: UpdateStackAction

#    you may not use this file except in compliance with the License.
#    You may obtain a copy of the License at
#
#        http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.

from mistral.actions import std_actions
from mistral import exceptions
from mistral.openstack.common import log as logging

LOG = logging.getLogger('mistral.actions.solum')


class UpdateStackAction(std_actions.HTTPAction):
    def __init__(self, heat_service_url, action_context,
                 stack_name, stack_id, parameters, image_id, template):
        merged_parms = parameters or {}
        merged_parms['image'] = image_id
        super(UpdateStackAction, self).__init__(
            url='%s/stacks/%s/%s' % (heat_service_url, stack_name, stack_id),
            method='PUT',
            headers={'X-Auth-Token': action_context['openstack']['auth_token'],
                     'Content-Type': 'application/json',
                     'User-Agent': 'mistral-heat-plugin',
                     'Accept': 'application/json'},
            body={'stack_id': stack_id,
开发者ID:BeenzSyed,项目名称:solum,代码行数:31,代码来源:heat.py


示例4: main

                                   os.pardir,
                                   os.pardir))
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'mistral', '__init__.py')):
    sys.path.insert(0, POSSIBLE_TOPDIR)


from oslo import messaging
from oslo.config import cfg

from mistral import config
from mistral.engine import engine
from mistral.engine.scalable.executor import server
from mistral.openstack.common import log as logging


LOG = logging.getLogger('mistral.cmd.task_executor')


def main():
    try:
        config.parse_args()
        logging.setup('Mistral')

        # TODO(rakhmerov): This is a temporary hack.
        # We have to initialize engine in executor process because
        # executor now calls engine.convey_task_result() directly.
        engine.load_engine()

        # Please refer to the oslo.messaging documentation for transport
        # configuration. The default transport for oslo.messaging is rabbitMQ.
        # The available transport drivers are listed under oslo.messaging at
开发者ID:dzimine,项目名称:mistral,代码行数:31,代码来源:task_executor.py


示例5: main

from wsgiref import simple_server

from oslo.config import cfg

from mistral.api import app
from mistral import config
from mistral.openstack.common import log as logging

eventlet.monkey_patch(
    os=True,
    select=True,
    socket=True,
    thread=False if '--use-debugger' in sys.argv else True,
    time=True)

LOG = logging.getLogger('mistral.cmd.api')


def main():
    try:
        config.parse_args()
        logging.setup('Mistral')

        host = cfg.CONF.api.host
        port = cfg.CONF.api.port

        server = simple_server.make_server(host, port, app.setup_app())

        LOG.info("Mistral API is serving on http://%s:%s (PID=%s)" %
                 (host, port, os.getpid()))
开发者ID:dzimine,项目名称:mistral,代码行数:30,代码来源:api.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python scheduler.schedule_call函数代码示例发布时间:2022-05-27
下一篇:
Python expressions.evaluate_recursively函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap