Write A Log File With The tracing Rust Crate
This is how I'm writing out a log file in Rust. It removes the file each time at the start of the process. Not always what I want, but super helpful in lots of cases. If I want to keep the logs going over time, I use
Code
```cargo
tracing = "0.1"
tracing-appender = "0.2"
tracing-subscriber = "0.3"
```
use ;
use PathBuf;
use fs;
Code
hourly
instead of
Code
never