Skip to content

Commit 2ce196f

Browse files
committed
Examples: Add env_logger
Makes debugging files a lot easier
1 parent f0335f1 commit 2ce196f

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

examples/tag_reader.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ use lofty::probe::Probe;
66
use std::path::Path;
77

88
fn main() {
9+
env_logger::init();
10+
911
let path_str = std::env::args().nth(1).expect("ERROR: No path specified!");
1012
let path = Path::new(&path_str);
1113

examples/tag_stripper.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ use lofty::probe::Probe;
66
use std::io::Write;
77

88
fn main() {
9+
env_logger::init();
10+
911
let path = std::env::args().nth(1).expect("ERROR: No path specified!");
1012

1113
let tagged_file = Probe::open(path.as_str())

examples/tag_writer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ struct Opt {
2929
}
3030

3131
fn main() {
32+
env_logger::init();
33+
3234
let opt = Opt::from_args();
3335

3436
let mut tagged_file = Probe::open(&opt.path)

lofty/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ features = ["derive"]
3838
optional = true
3939

4040
[dev-dependencies]
41+
# For examples
42+
env_logger = "0.11.8"
4143
# WAV properties validity tests
4244
hound = { git = "https://github.com/ruuda/hound.git", rev = "02e66effb33683dd6acb92df792683ee46ad6a59" }
4345
rusty-fork = "0.3.0"

0 commit comments

Comments
 (0)