From 0573bfab4eb3bf6c4fffe77488f1e60b945d8ae6 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 22 Jun 2023 21:28:35 -0400 Subject: [PATCH] use a pretty fmt --- Cargo.lock | 17 +++++++++++++++++ nix-actions-cache/Cargo.toml | 2 +- nix-actions-cache/src/main.rs | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 71c055e..ebd9627 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -627,6 +627,16 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num_cpus" version = "1.15.0" @@ -649,6 +659,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "percent-encoding" version = "2.2.0" @@ -1243,6 +1259,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "matchers", + "nu-ansi-term", "once_cell", "regex", "sharded-slab", diff --git a/nix-actions-cache/Cargo.toml b/nix-actions-cache/Cargo.toml index 26252aa..3e19174 100644 --- a/nix-actions-cache/Cargo.toml +++ b/nix-actions-cache/Cargo.toml @@ -12,7 +12,7 @@ axum = { version = "0.6.18", default-features = false, features = ["json", "toki axum-macros = "0.3.7" clap = { version = "4.2.7", default-features = false, features = ["std", "derive", "error-context"] } tracing = "0.1.37" -tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter", "fmt", "tracing-log", "smallvec"] } +tracing-subscriber = { version = "0.3.17", default-features = false, features = ["ansi", "env-filter", "fmt", "tracing-log", "smallvec"] } tower-http = { version = "0.4.0", features = ["trace"] } serde = { version = "1.0.162", features = ["derive"] } serde_json = { version = "1.0.96", default-features = false } diff --git a/nix-actions-cache/src/main.rs b/nix-actions-cache/src/main.rs index 7105dd5..de32c78 100644 --- a/nix-actions-cache/src/main.rs +++ b/nix-actions-cache/src/main.rs @@ -182,7 +182,7 @@ fn init_logging() { }); tracing_subscriber::fmt() - .without_time() + .pretty() .with_env_filter(filter) .init(); }