Skip to content

Logging

This page describes how to configure and operate logging at runtime.


  • Log format: JSON
  • Log level: info
  • Output: stdout

Controls log filtering.

Examples:

Terminal window
export RUST_LOG=info
export RUST_LOG=warn,snakeway=info
export RUST_LOG=warn,snakeway=debug,pingora=error

If unset or invalid, logging defaults to:

info

Enables file-based logging with daily rotation.

When set:

  • Logs are written to snakeway.log in the specified directory.
  • Logs rotate daily.
  • Output is written to files instead of stdout.

Example:

Terminal window
export SNAKEWAY_LOG_DIR=/var/log/snakeway

Enables Tokio Console mode for interactive debugging.

When set:

  • Normal logging is disabled.
  • Tokio Console instrumentation is enabled.
  • Intended for interactive debugging only.

Example:

Terminal window
export TOKIO_CONSOLE=1

This is flag is most useful inline:

Terminal window
TOKIO_CONSOLE=1 snakeway /etc/snakeway/