Skip to content

All About Logs

Diwaker Gupta edited this page Jun 2, 2023 · 5 revisions

Tips and Tricks

Logs go stderr

The stacks-node binary output logs to stderr (vs. stdout). To easily capture / pipe / filter logs (e.g. using tools like tee), redirect stderr to stdout. In bash, this is accomplished with 2>&1, like so:

$ stacks-node start --config follower.toml 2>&1 | tee info-logs.txt`

Enabling debug logs

By default, the log level is set to INFO. To enable debug logging, set the environment variable STACKS_LOG_DEBUG=1.

$ STACKS_LOG_DEBUG=1 stacks-node start --config follower.toml 2>&1 | tee info-logs.txt`

To set the log-level to TRACE, set STACKS_LOG_TRACE=1 instead.