numam-spdk/scripts/rpc/log.py
Daniel Verkamp a54e7e584b rpc.py: make 'verbose' a client parameter
Rather than requiring the 'verbose' flag as a parameter to
JSONRPCClient.call(), move it to the JSONRPCClient constructor so that
it can be set once.

This fixes the inconsistency between RPC method wrappers that passed
args.verbose and those that didn't; now, rpc.py -v works reliably for
all methods.

The JSONRPCClient.call() verbose parameter is maintained as well to
allow individual calls to be set to verbose if desired.

Change-Id: Iee385510cc9eb1d2984d3b9982055789dff188c6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/398508
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
2018-02-06 08:54:38 -05:00

34 lines
747 B
Python
Executable File

from client import print_dict, print_array, int_arg
def set_trace_flag(args):
params = {'flag': args.flag}
args.client.call('set_trace_flag', params)
def clear_trace_flag(args):
params = {'flag': args.flag}
args.client.call('clear_trace_flag', params)
def get_trace_flags(args):
print_dict(args.client.call('get_trace_flags'))
def set_log_level(args):
params = {'level': args.level}
args.client.call('set_log_level', params)
def get_log_level(args):
print_dict(args.client.call('get_log_level'))
def set_log_print_level(args):
params = {'level': args.level}
args.client.call('set_log_print_level', params)
def get_log_print_level(args):
print_dict(args.client.call('get_log_print_level'))