Managing SPDK logs

Get, set, and disable Storage Performance Development Kit (SPDK) log information for NVMe-oF by using the command-line interface (CLI).

Getting the SPDK log level

Use the spdk_log_level get command to retrieve the SPDK version.
ceph nvmeof spdk_log_level get
For example,
[root@host01 ~]# ceph nvmeof spdk_log_level get
+---------+---------------+---------------------------------------------------------------------------------------------------------------------+
|Log Level|Log Print Level|Nvmf Log Flags                                                                                                       |
+---------+---------------+---------------------------------------------------------------------------------------------------------------------+
|NOTICE   |INFO           |[{'name': 'nvmf', 'enabled': False}, {'name': 'nvmf_auth', 'enabled': False}, {'name': 'nvmf_tcp', 'enabled': False}]|
+---------+---------------+---------------------------------------------------------------------------------------------------------------------+

Setting the SPDK log level

Use the spdk_log_level set command to set the log level for the SPDK output and NVMe over Fabrics target (nvmf) log flags.

The available SPDK nvmf log levels and SPDK nvmf print levels are: DEBUG, INFO, NOTICE, WARNING, and ERROR.

ceph nvmeof spdk_log_level set --log_level SPDK_NVMF_LOG_LEVEL --print_level SPDK_NVMF_LOG_PRINT_LEVEL
The following example sets both the print and log levels to ERROR.
[root@host01 ~]# ceph nvmeof spdk_log_level set --log_level DEBUG --print_level DEBUG
Success

Disabling SPDK log flags

Use the spdk_log_level disable command to remove the log level for the SPDK output and NVMe over Fabrics target (nvmf) log flags.
ceph nvmeof spdk_log_level disable
For example,
[root@host01 ~]# ceph nvmeof spdk_log_level disable
Success