Commit 3638092d authored by Matias Guijarro's avatar Matias Guijarro
Browse files

Merge branch 'fix-log-api' into 'master'

Add kwargs to log methods

Closes #2808

See merge request !3776
parents fc6c70ba 70407ec5
Pipeline #48228 passed with stages
in 109 minutes and 5 seconds
......@@ -157,10 +157,10 @@ Args:
def log_debug(instance, msg, *args):
def log_debug(instance, msg, *args, **kwargs):
__doc__ = LOG_DOCSTRING + "Log level: DEBUG"
logger = get_logger(instance)
logger.debug(msg, *args)
logger.debug(msg, *args, **kwargs)
def log_debug_data(instance, msg, *args):
......@@ -185,34 +185,34 @@ def log_debug_data(instance, msg, *args):
logger.debug_data(msg, *args)
def log_info(instance, msg, *args):
def log_info(instance, msg, *args, **kwargs):
__doc__ = LOG_DOCSTRING + "Log level: INFO"
logger = get_logger(instance), *args), *args, **kwargs)
def log_warning(instance, msg, *args):
def log_warning(instance, msg, *args, **kwargs):
__doc__ = LOG_DOCSTRING + "Log level: WARNING"
logger = get_logger(instance)
logger.warning(msg, *args)
logger.warning(msg, *args, **kwargs)
def log_error(instance, msg, *args):
def log_error(instance, msg, *args, **kwargs):
__doc__ = LOG_DOCSTRING + "Log level: ERROR"
logger = get_logger(instance)
logger.error(msg, *args)
logger.error(msg, *args, **kwargs)
def log_critical(instance, msg, *args):
def log_critical(instance, msg, *args, **kwargs):
__doc__ = LOG_DOCSTRING + "Log level: CRITICAL"
logger = get_logger(instance)
logger.critical(msg, *args)
logger.critical(msg, *args, **kwargs)
def log_exception(instance, msg, *args):
def log_exception(instance, msg, *args, **kwargs):
__doc__ = LOG_DOCSTRING + "Log level: ERROR with added exception trace"
logger = get_logger(instance)
logger.exception(msg, *args)
logger.exception(msg, *args, **kwargs)
def set_log_format(instance, frmt):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment