예제 #1
0
파일: __init__.py 프로젝트: jsilhan/librepo
def set_debug_log_handler(log_function, user_data=None):
    """
    When python debug log handler is used, the librepo is **THREAD-UNSAFE**!

    :param log_function: Function that will handle the debug messages.
    :param user_data: An data you want to be passed to the log_function
                      during call.
    :returns: *None*

    Example::

        def debug_function(msg, _):
            print msg
        librepo.set_debug_log_handler(debug_function)

    """
    return _librepo.set_debug_log_handler(log_function, user_data)
예제 #2
0
def set_debug_log_handler(log_function, user_data=None):
    """
    When python debug log handler is used, the librepo is **THREAD-UNSAFE**!

    :param log_function: Function that will handle the debug messages.
    :param user_data: An data you want to be passed to the log_function
                      during call.
    :returns: *None*

    Example::

        def debug_function(msg, _):
            print msg
        librepo.set_debug_log_handler(debug_function)

    """
    return _librepo.set_debug_log_handler(log_function, user_data)
예제 #3
0
파일: __init__.py 프로젝트: RavenB/librepo
def set_debug_log_handler(log_function, user_data=None):
    """
    ONLY FOR DEVELOPMENT (DEBUGGING) PURPOSES!

    When python debug log handler is used, the librepo is **THREAD-UNSAFE**!

    If used, it overrides logging set by log_set_file and vice versa.

    :param log_function: Function that will handle the debug messages.
    :param user_data: An data you want to be passed to the log_function
                      during call.
    :returns: *None*

    Example::

        def debug_function(msg, _):
            print msg
        librepo.set_debug_log_handler(debug_function)

    """
    return _librepo.set_debug_log_handler(log_function, user_data)