Crate dev_logger

source ·
Expand description

Convenient env_logger for testing purpose.


// In

// In test function:
tracing::info!(name = "message");

// Set RUST_LOG=info and run the test.


Call init on startup. This is useful for tests.


Initialize tracing and env_logger for adhoc logging (ex. in a library test) purpose.
Trace the given function using the given filter (in EnvFilter format). Return strings representing the traced logs.

Attribute Macros

Marks a function or static variable as a library/executable constructor. This uses OS-specific linker sections to call a specific function at load time.