numam-spdk/scripts/rpc/log.py
Jim Harris 870b0e5b29 log: remove "trace" from log flag RPCs
We will keep the RPCs for now but mark them deprecated.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0407dcb392ea0c9e89c0f26cd5670aed2dbfadef

Reviewed-on: https://review.gerrithub.io/435345
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-12-03 19:50:15 +00:00

78 lines
1.5 KiB
Python

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)
def set_trace_flag(client, flag):
return set_log_flag(client, 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)
def clear_trace_flag(client, flag):
return clear_log_flag(client, flag)
def get_log_flags(client):
"""Get log flags
Returns:
List of log flags
"""
return client.call('get_log_flags')
def get_trace_flags(client):
return get_log_flags(client)
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')