Validators
Mainnet
Maintenance
Getting Logs

Getting Logs

We use journald (opens in a new tab), which is systemd default log management service, to collect logs generated by the node and the engine. To interact with it, you'll use journalctl. Below are some useful commands when debugging your validator node.

Journalctl 101

Getting all logs for unit

journalctl -u chainflip-node.service

This will output all logs generated by that unit. You hit space to scroll through the logs from older to newer.

Following logs

If you want to see logs in real time, run the following:

journalctl -f -u chainflip-node.service

Using time ranges

To filter your logs using time ranges you can run the following:

Relative time range

journalctl -u chainflip-node.service --since "1 hour ago"

Specific time ranges

journalctl -u chainflip-node.service --since "2023-06-20 23:15:00" --until "2023-06-20 23:25:00"

Setting Log Levels

Most of the time it is ok to just use the default log levels. However, these can be changed, either via environment variable, or dynamically.

Environment Variable Log Level Changes

The RUST_LOG environment variable controls the initial filtering directives if specified at engine startup.

For example:

export RUST_LOG="debug,warp=off,hyper=off,jsonrpc=off,web3=off,reqwest=off"

Dynamic Log Level Changes

Returns the current filtering directives:

curl -X GET 127.0.0.1:36079/tracing

Note: The port used by the engine to accept these queries can be configured in your Settings.toml file.

Sets the filter directives so the default is DEBUG, and the logging in modules warp, hyper, jsonrpc, web3, and reqwest is turned off:

curl --json '"debug,warp=off,hyper=off,jsonrpc=off,web3=off,reqwest=off"' 127.0.0.1:36079/tracing

Equivalent to the above, but without using the --json short-hand:

curl -X POST -H 'Content-Type: application/json' -d '"debug,warp=off,hyper=off,jsonrpc=off,web3=off,reqwest=off"' 127.0.0.1:36079/tracing

The syntax for specifying filtering directives is given here (opens in a new tab).