Quick Tracing
tracing initialization library to easily get started with tracing.
:Result
Derive
Need to write the following it in Cargo.toml
= { = "0.1.5", = ["derive"] }
Attributes
test: Sets the test name for the logger. Log output will be written to a file named../../logs/{test_name}.log.file: Sets the file path for the log output.stdio: Enables standard I/O output for the logger.(default: true)level: Sets the log level filter (e.g.,TRACE,DEBUG,INFO,WARN,ERROR).
Examples
-
Debug mode + Output file
If there is no parent directory, it will automatically create one.
[!WARNING] Panic is a possibility.
-
non panic + Debug mode + Output file
If there is no parent directory, it will automatically create one.