Skip to content

Commit 498d603

Browse files
committed
convert paris coloring to owo-colors which is more compatible with tracing
1 parent d718555 commit 498d603

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ glob = "0.3.1"
1111
serde = { version = "1.0", features = ["derive"] }
1212
serde_yml = "0.0.12"
1313
serde_nested_with = "0.2.5"
14-
tracing = { version = "0.1.41", features = ["attributes"] }
15-
tracing-subscriber = { version = "0.3.19", features = ["chrono", "env-filter"] }
1614
fully_pub = "0.1.4"
1715
void = "1"
1816
futures = "0.3.30"
1917
figment = { version = "0.10.19", features = ["env", "yaml", "test"] }
2018
zip = { version = "2.2.2", default-features = false, features = ["deflate"] }
2119

20+
# tracing
21+
tracing = { version = "0.1.41", features = ["attributes"] }
22+
tracing-subscriber = { version = "0.3.19", features = ["chrono", "env-filter"] }
23+
owo-colors = "4.2.0"
24+
2225
# kubernetes:
2326
kube = { version = "0.99.0", features = ["runtime", "derive"] }
2427
k8s-openapi = { version = "0.24.0", features = ["latest"] }

src/builder/docker.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use bollard::image::{BuildImageOptions, PushImageOptions};
88
use bollard::Docker;
99
use core::fmt;
1010
use futures::{StreamExt, TryStreamExt};
11+
use owo_colors::OwoColorize;
1112
use std::fs::File;
1213
use std::io::{Seek, Write};
1314
use std::path::PathBuf;
@@ -70,10 +71,10 @@ pub async fn build_image(context: &Path, options: &BuildObject, tag: &str) -> Re
7071

7172
if let Some(log) = msg.stream {
7273
info!(
73-
"building {}: <bright-black>{}</>",
74+
"building {}: {}",
7475
context.to_string_lossy(),
7576
// tag,
76-
log.trim()
77+
log.trim().bright_black(),
7778
)
7879
}
7980
}

src/cluster_setup/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use kube::api::{DynamicObject, Patch, PatchParams};
1414
use kube::runtime::WatchStreamExt;
1515
use kube::{Api, ResourceExt};
1616
use minijinja;
17+
use owo_colors::OwoColorize;
1718
use serde;
1819
use serde_yml;
1920
use tempfile;
@@ -161,7 +162,9 @@ fn install_helm_chart(
161162

162163
for item in lines {
163164
match item {
164-
Ok(line) => debug!("helm: <bright-black>{line}</>"),
165+
Ok(line) => {
166+
debug!("helm: {}", line.bright_black());
167+
}
165168
Err(e) => return Err(e.into()),
166169
}
167170
}

0 commit comments

Comments
 (0)