Was this page helpful?
Caution
You're viewing documentation for a previous version of ScyllaDB Open Source. Switch to the latest stable version.
You have the option to change the log level either while the cluster is offline or during runtime. Each log level is assigned to a specific ScyllaDB class. To display the log classes (output changes with each version), run the following:
scylla --help-loggers
ScyllaDB presents the user with a variety of loggers that control the amount and detail of information printed to the system logs. This article contains information about how to query and change the log level of each individual logging system.
To obtain the status of a particular logger:
curl -X GET http://127.0.0.1:10000/system/logger/<subsystem_name>
For example:
curl -X GET http://127.0.0.1:10000/system/logger/sstable
Example output
"info"
To change the status of a particular logger:
curl -X POST http://127.0.0.1:10000/system/logger/sstable?level=trace
Valid log levels are: trace
, debug
, info
, warn
, error
.
Alternatively, you can use Nodetool commands. Refer to setlogginglevel to set the logging level threshold for ScyllaDB classes.
In order to debug issues that occur during the ScyllaDB start, the procedure above will not be helpful. This procedure can be used to assess ScyllaDB Start issues, or it can be used when the cluster is down. Note that any changes made here will only take effect after ScyllaDB starts.
ScyllaDB has command line options you can invoke to set the log level. Once set, the change is implemented during the ScyllaDB start. Thus users can append new log level options by editing the SCYLLA_ARGS parameter in /etc/sysconfig/scylla-server
.
ScyllaDB Options
ScyllaDB Options |
Description |
---|---|
|
Default log level for log messages. Valid values are trace, debug, info, warn, error. |
|
Map of logger name to log level. The format is |
Syntax
Log levels are assigned to a specific class for a specific log level in the following format:
single
class=level
multiple
class=level:class=level:class=level
Examples
To enable the debug log level for the sstable class and enable trace debug level for the cql_server class.
--logger-log-level sstable=debug:cql_server=trace
sudo cat /etc/sysconfig/scylla-server|grep ^SCYLLA_ARGS=
SCYLLA_ARGS="--log-to-syslog 1 --log-to-stdout 0 --default-log-level info --network-stack posix --logger-log-level sstable=debug:cql_server=trace"
ps aux|grep '/usr/bin/scylla' |grep -v grep
scylla 32645 5.1 1.7 17180101468 67484 ? Ssl 09:03 0:03 /usr/bin/scylla --log-to-syslog 1 --log-to-stdout 0 --default-log-level info --network-stack posix
--logger-log-level sstable=debug:cql_server=trace --num-io-queues=2 --max-io-requests=8
curl -X GET http://127.0.0.1:10000/system/logger/cql_server
"trace"
curl -X GET http://127.0.0.1:10000/system/logger/sstable
"debug"
To enable the debug log level for all classes
--default-log-level debug
Was this page helpful?