summaryrefslogtreecommitdiffstats
path: root/src/spdk/scripts/rpc/log.py
blob: a152b3b84e9750d89e80c795c07ba209f9de808d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
def set_trace_flag(client, flag):
    """Set trace flag.

    Args:
        flag: trace mask we want to set. (for example "nvme")
    """
    params = {'flag': flag}
    return client.call('set_trace_flag', params)


def clear_trace_flag(client, flag):
    """Clear trace flag.

    Args:
        flag: trace mask we want to clear. (for example "nvme")
    """
    params = {'flag': flag}
    return client.call('clear_trace_flag', params)


def get_trace_flags(client):
    """Get trace flags

    Returns:
        List of trace flag
    """
    return client.call('get_trace_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')