e2d7d02d65
We marked the old set/clear/get_trace_flags as deprecated in v19.01. These are now called set/clear/get_log_flags (to reduce confusion with the tracing framework). Use the new methods in this patch series to mark these RPCs as deprecated. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I5ce8992ce8f6c1de5d5596b5f94a1587555e8546 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453563 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
72 lines
1.4 KiB
Python
72 lines
1.4 KiB
Python
from .helpers import deprecated_alias
|
|
|
|
|
|
@deprecated_alias('set_trace_flag')
|
|
def set_log_flag(client, flag):
|
|
"""Set log flag.
|
|
|
|
Args:
|
|
flag: log flag we want to set. (for example "nvme")
|
|
"""
|
|
params = {'flag': flag}
|
|
return client.call('set_log_flag', params)
|
|
|
|
|
|
@deprecated_alias('clear_trace_flag')
|
|
def clear_log_flag(client, flag):
|
|
"""Clear log flag.
|
|
|
|
Args:
|
|
flag: log flag we want to clear. (for example "nvme")
|
|
"""
|
|
params = {'flag': flag}
|
|
return client.call('clear_log_flag', params)
|
|
|
|
|
|
@deprecated_alias('get_trace_flags')
|
|
def get_log_flags(client):
|
|
"""Get log flags
|
|
|
|
Returns:
|
|
List of log flags
|
|
"""
|
|
return client.call('get_log_flags')
|
|
|
|
|
|
def set_log_level(client, level):
|
|
"""Set log level.
|
|
|
|
Args:
|
|
level: log level we want to set. (for example "DEBUG")
|
|
"""
|
|
params = {'level': level}
|
|
return client.call('set_log_level', params)
|
|
|
|
|
|
def get_log_level(client):
|
|
"""Get log level
|
|
|
|
Returns:
|
|
Current log level
|
|
"""
|
|
return client.call('get_log_level')
|
|
|
|
|
|
def set_log_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('set_log_print_level', params)
|
|
|
|
|
|
def get_log_print_level(client):
|
|
"""Get log print level
|
|
|
|
Returns:
|
|
Current log print level
|
|
"""
|
|
return client.call('get_log_print_level')
|