rust-tracing-practices
Installation
SKILL.md
Rust Tracing Practices
Event Recording
- Use level-specific macros for appropriate visibility:
info!,debug!,trace!,warn!,error! - Provide structured data as named arguments to facilitate automated processing and filtering
- Format log messages consistently, beginning with verbs in present tense
- Include relevant context through key-value pairs:
tracing::info!(user_id = user.id, action = "login", "User logged in successfully");
tracing::error!(error = %e, user_id = user.id, "Failed to authenticate user");