Debugging, Logging

cat-development-tools::debugging

Help you figure out what is going on with your code such as logging, tracing, or assertions.

Debuggers

TopicRust Crates
Debugginggdb or lldb
RecipeCratesCategories
cat-development-tools::debugging

Logging & Tracing

tracing

tracing is a newer, more structured logging library with support for spans and context. Supports asynchronous logging. Often used with tracing-subscriber for formatting and output.

tracing-subscriber is used with tracing to format log output, often to JSON or other structured formats. Can also be used for filtering.

Older Frameworks

log and Friends

TopicRust Crates
Logging Frameworklog is an older crate providing logging macros and facade.
Log Implementations (Loggers)env_logger: A simple logger that configures logging based on environment variables. log4rs is a more flexible logger that supports configuration files (YAML, TOML, JSON).
Log FilteringCan be done with env_logger, log4rs.

Panics & Logging

log-panics logs panics with backtraces.

Diagnostic Functions

  • Development Tools.
  • Development Tools: Profiling.
  • Development Tools: Testing.