summaryrefslogtreecommitdiffstats
path: root/src/spdk/scripts/rpc/log.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/spdk/scripts/rpc/log.py
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/spdk/scripts/rpc/log.py')
-rw-r--r--src/spdk/scripts/rpc/log.py65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/spdk/scripts/rpc/log.py b/src/spdk/scripts/rpc/log.py
new file mode 100644
index 00000000..a152b3b8
--- /dev/null
+++ b/src/spdk/scripts/rpc/log.py
@@ -0,0 +1,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')