How to enable TRACE logging on LINSTOR

This article explains how to change the log level of LINSTOR's controller and satellite components, both temporarily and persistently.

NOTE: For k8s environments see the instructions here: https://kb.linbit.com/log-levels-in-linstor-for-k8s

LINSTOR® provides several ways of adjusting the log level of its components. The available log levels are ERROR, WARN, INFO, DEBUG, and TRACE, in descending order of verbosity.

Persistently in the Configuration Files

The log level can be adjusted in LINSTOR's various configuration files. This requires a restart of the affected component.

Controller

For the controller log level, the file /etc/linstor/linstor.toml needs to be edited.

[root@linstor ~]# cat /etc/linstor/linstor.toml

...

[logging]
level = "TRACE"

Satellite

For the satellite, the file /etc/linstor/linstor_satellite.toml needs to be edited.

[root@linstor ~]# cat /etc/linstor/linstor_satellite.toml 

...

[logging]
level="TRACE"

Temporarily Using the REST API

The log level can also be changed during active operation by utilizing LINSTOR's various REST API endpoints for configuration management. These changes are lost when the component in question is restarted.

Controller

curl -X PUT -H "Content-Type: application/json" -d '{"log": {"level": "TRACE"}}' http://YOUR_CONTROLLER:3370/v1/controller/config

Satellite

curl -X PUT -H "Content-Type: application/json" -d '{"log": {"level": "TRACE"}}' http://YOUR_CONTROLLER:3370/v1/nodes/YOUR_SATELLITE/config

There are multiple log level keys to adjust:

  • level only modifies the log level of the controller.
  • level_global modifies the log level of the whole cluster, i.e. the controller including all satellites.
  • level_linstor: TODO
  • level_linstor_global: TODO

 

Updated 2022/05/19 - DJV