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


Python logger.debug方法代码示例

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


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

示例1: __init__

# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def __init__(self, *args):
        self.builtin = BuiltIn()
        logger.debug("initializing PageObjects...")
        importer = robot.utils.Importer()

        for file_path in args:
            try:
                importer.import_class_or_module_by_path(os.path.abspath(file_path))
                logger.debug("imported page object {}".format(file_path))
            except Exception as e:
                logger.warn(str(e))
        self.current_page_object = None

        # Start with this library at the front of the library search order;
        # that may change as page objects are loaded.
        try:
            self.builtin.set_library_search_order("PageObjects")
        except RobotNotRunningError:
            # this should only happen when trying to load this library
            # via the robot_libdoc task, in which case we don't care
            # whether this throws an error or not.
            pass 
开发者ID:SFDO-Tooling,项目名称:CumulusCI,代码行数:24,代码来源:PageObjects.py

示例2: write

# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def write(msg, level="INFO", html=False, attachment=None):
    """Writes the message to the log file using the given level.

    Valid log levels are ``TRACE``, ``DEBUG``, ``INFO`` (default since RF
    2.9.1), ``WARN``, and ``ERROR`` (new in RF 2.9). Additionally it is
    possible to use ``HTML`` pseudo log level that logs the message as HTML
    using the ``INFO`` level.

    Attachment should contain a dict with "name", "data" and "mime" values
    defined. See module example.

    Instead of using this method, it is generally better to use the level
    specific methods such as ``info`` and ``debug`` that have separate
    ``html`` argument to control the message format.
    """
    log_message = LogMessage(msg)
    log_message.level = level
    log_message.attachment = attachment
    logger.write(log_message, level, html) 
开发者ID:reportportal,项目名称:agent-Python-RobotFramework,代码行数:21,代码来源:logger.py

示例3: wait_for_angular

# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def wait_for_angular(self, timeout=None, error=None):
        """
        An explicit wait allowing Angular queue to empty.

        With the implicit wait functionality it is expected that most of the
        situations where waiting is needed will be handled "automatically" by
        the "hidden" implicit wait. Thus it is expected that this keyword will
        be rarely used.
        """
        # Determine timeout and error
        timeout = timeout or self._s2l.get_selenium_timeout()
        timeout = timestr_to_secs(timeout)
        error = error or ('Timed out waiting for AngularJSLibrary to synchronize with ' +
                         'the page after specified timeout.')

        try:
            WebDriverWait(self._sldriver, timeout, 0.2)\
                .until_not(lambda x: self._sldriver.execute_script(js_wait_for_angular, self.root_selector))
        except TimeoutException:
            pass
            #if self.trackOutstandingTimeouts:
            #    timeouts = self._exec_js('return window.NG_PENDING_TIMEOUTS')
            #    logger.debug(timeouts)
            #pendingHttps = self._exec_js(js_get_pending_http_requests)
            #logger.debug(pendingHttps)
            #raise TimeoutException(error) 
开发者ID:Selenium2Library,项目名称:robotframework-angularjs,代码行数:28,代码来源:__init__.py

示例4: _run_on_failure

# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def _run_on_failure(self):
        if not self.keyword_on_failure:
            return
        try:
            BuiltIn().run_keyword(self.keyword_on_failure)
        except Exception as e:
            LOGGER.debug(e)
            LOGGER.warn('Failed to take a screenshot. '
                        'Is Robot Framework running?') 
开发者ID:eficode,项目名称:robotframework-imagehorizonlibrary,代码行数:11,代码来源:__init__.py

示例5: _normalize_result

# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def _normalize_result(self, elements):
        if not isinstance(elements, list):
            logger.debug("WebDriver find returned %s" % elements)
            return []
        return elements 
开发者ID:serhatbolsu,项目名称:robotframework-appiumlibrary,代码行数:7,代码来源:elementfinder.py

示例6: _debug

# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def _debug(self, message):
        if self._log_level in self.LOG_LEVEL_DEBUG:
            logger.debug(message) 
开发者ID:serhatbolsu,项目名称:robotframework-appiumlibrary,代码行数:5,代码来源:_logging.py

示例7: debug

# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def debug(msg, html=False, attachment=None):
    """Writes the message to the log file using the ``DEBUG`` level."""
    write(msg, "DEBUG", html, attachment) 
开发者ID:reportportal,项目名称:agent-Python-RobotFramework,代码行数:5,代码来源:logger.py

示例8: _debug

# 需要导入模块: from robot.api import logger [as 别名]
# 或者: from robot.api.logger import debug [as 别名]
def _debug(self, message):
        logger.debug(message) 
开发者ID:luisxiaomai,项目名称:robotframework-anywherelibrary,代码行数:4,代码来源:logging.py


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