docs(log): add an example for using a logfile

This commit is contained in:
Christoph J. Scherr 2024-07-09 19:37:13 +02:00
parent 673eb691e9
commit 1c92f95901
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
use libpt_log::Logger;
use tracing::info;
fn main() {
let _logger = Logger::builder()
.log_to_file(true)
.log_dir("/tmp/llll".into())
.build()
.unwrap();
info!("foo bar qux");
}