numam-spdk/scripts/rpc/log.py
Maciej Wawryk 416310d543 RPC: rename get_log_flags to log_get_flags
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ic960543ca82c02b677e0059367ee1e63c4ca8611
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468731
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-24 16:42:41 +00:00

76 lines
1.6 KiB
Python

from .helpers import deprecated_alias
@deprecated_alias('set_log_flag')
def log_set_flag(client, flag):
"""Set log flag.
Args:
flag: log flag we want to set. (for example "nvme")
"""
params = {'flag': flag}
return client.call('log_set_flag', params)
@deprecated_alias('clear_log_flag')
def log_clear_flag(client, flag):
"""Clear log flag.
Args:
flag: log flag we want to clear. (for example "nvme")
"""
params = {'flag': flag}
return client.call('log_clear_flag', params)
@deprecated_alias('get_log_flags')
def log_get_flags(client):
"""Get log flags
Returns:
List of log flags
"""
return client.call('log_get_flags')
@deprecated_alias('set_log_level')
def log_set_level(client, level):
"""Set log level.
Args:
level: log level we want to set. (for example "DEBUG")
"""
params = {'level': level}
return client.call('log_set_level', params)
@deprecated_alias('get_log_level')
def log_get_level(client):
"""Get log level
Returns:
Current log level
"""
return client.call('log_get_level')
@deprecated_alias('set_log_print_level')
def log_set_print_level(client, level):
"""Set log print level.
Args:
level: log print level we want to set. (for example "DEBUG")
"""
params = {'level': level}
return client.call('log_set_print_level', params)
@deprecated_alias('get_log_print_level')
def log_get_print_level(client):
"""Get log print level
Returns:
Current log print level
"""
return client.call('log_get_print_level')