def simple_logger(**kwargs):
    """
    Creates a simple logger

    :param str name: The logger's name ('api', 'back'...)
    :param int base_level: Lowest level allowed to log (Default: DEBUG)
    :param str log_format: Logging format used for STDOUT
                           (Default: logs.FORMAT)

    :param bool should_stdout: Allows to log to stdout (Default: True)
    :param int stdout_level: Lowest level allowed to log to STDOUT
                             (Default: DEBUG)

    :param bool should_http: Allows to log to HTTP server
    :param int http_level: Lowest level allowed to log to the HTTP server
                           (Has to be superior or equals to base_level)
    :param str http_host: Address of the HTTP Server
    :param str http_url: Url of the HTTP Server
    """
    # Args
    logger_name = kwargs.get('name')
    base_level = kwargs.get('base_level', logging.DEBUG)

    should_stdout = kwargs.get('should_stdout', True)

    should_http = kwargs.get('should_http', False)

    # Generate base logger
    logger = logging.getLogger(logger_name)
    logger.setLevel(base_level)

    # Define stdout handler
    if should_stdout:
        logger.addHandler(_add_stream_handler(**kwargs))

    if should_http:
        logger.addHandler(_add_http_handler(**kwargs))
    return logger
def simple_logger ( ** kwargs ) : logger_name = kwargs . get ( 'name' ) base_level = kwargs . get ( 'base_level' , logging . DEBUG ) should_stdout = kwargs . get ( 'should_stdout' , True ) should_http = kwargs . get ( 'should_http' , False ) logger = logging . getLogger ( logger_name ) logger . setLevel ( base_level ) if should_stdout : logger . addHandler ( _add_stream_handler ( ** kwargs ) ) if should_http : logger . addHandler ( _add_http_handler ( ** kwargs ) ) return logger
Creates a simple logger

    :param str name: The logger's name ('api', 'back'...)
    :param int base_level: Lowest level allowed to log (Default: DEBUG)
    :param str log_format: Logging format used for STDOUT
                           (Default: logs.FORMAT)

    :param bool should_stdout: Allows to log to stdout (Default: True)
    :param int stdout_level: Lowest level allowed to log to STDOUT
                             (Default: DEBUG)

    :param bool should_http: Allows to log to HTTP server
    :param int http_level: Lowest level allowed to log to the HTTP server
                           (Has to be superior or equals to base_level)
    :param str http_host: Address of the HTTP Server
    :param str http_url: Url of the HTTP Server