Skip to content

Commit

Permalink
Move to env_logger cuz it's more popular
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX committed Feb 5, 2024
1 parent d36df04 commit e17a666
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 30 deletions.
44 changes: 22 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ cfg-if = "1.0.0"
clap = { version = "4.4.18", features = ["derive", "wrap_help"] }
clap-num = "1.1.1"
clap-verbosity-flag = { package = "clap-verbosity-flag2", version = "2.1.1" }
env_logger = { version = "0.11.1", default-features = false, features = ["auto-color"] }
error-stack = "0.4.1"
io-adapters = "0.3.0"
itoa = "1.0.10"
log = { version = "0.4.20", features = ["release_max_level_info"] }
rand = { version = "0.8.5", default-features = false, features = ["std"] }
rand_distr = "0.4.3"
rand_xoshiro = "0.6.0"
simple_logger = { version = "4.3.3", default-features = false, features = ["colors"] }
sysexits = "0.7.11"
thiserror = "1.0.56"
thousands = "0.2.0"
Expand Down
10 changes: 4 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,10 @@ fn main() -> ExitCode {
let level = args.verbose.log_level().unwrap_or_else(log::Level::max);

#[cfg(not(feature = "trace"))]
match simple_logger::init_with_level(level) {
Ok(()) => {}
Err(e) => {
drop(writeln!(io::stderr(), "Failed to initialize logger: {e:?}"));
}
}
env_logger::builder()
.format_timestamp(None)
.filter_level(level.to_level_filter())
.init();
#[cfg(feature = "trace")]
{
use tracing_log::AsTrace;
Expand Down
2 changes: 1 addition & 1 deletion testdata/cmds/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Info output:
```console
$ ftzz -vv -n 1K verbose
About 1,000 files will be generated in approximately 1,000 directories distributed across a tree of maximum depth 5 where each directory contains approximately 4 other directories.
INFO [ftzz::generator] Starting config: Configuration { root_dir: "verbose", files: 1000, bytes: 0, files_exact: false, bytes_exact: false, fill_byte: None, dirs_per_dir: 3.9810717055349727, bytes_per_file: 0.0, max_depth: 5, seed: 2268264718836998093, human_info: HumanInfo { dirs_per_dir: 4, total_dirs: 1000, bytes_per_files: 0 } }
[INFO ftzz::generator] Starting config: Configuration { root_dir: "verbose", files: 1000, bytes: 0, files_exact: false, bytes_exact: false, fill_byte: None, dirs_per_dir: 3.9810717055349727, bytes_per_file: 0.0, max_depth: 5, seed: 2268264718836998093, human_info: HumanInfo { dirs_per_dir: 4, total_dirs: 1000, bytes_per_files: 0 } }
Created 578 files across 1,033 directories.

```

0 comments on commit e17a666

Please sign in to comment.