summaryrefslogtreecommitdiffstats
path: root/src/commands/build.rs
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-02-08 12:47:30 +0100
committerMatthias Beyer <matthias.beyer@atos.net>2021-02-08 12:47:30 +0100
commit269afd5d42294c2f80419d1def06b6730e312a14 (patch)
tree376ec6e6ebda21da05a6c22935332ed1b99881a6 /src/commands/build.rs
parent196af96ef354b915fabe5670eba36ed93abbdcb3 (diff)
Colorize log output for better discoverability
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/commands/build.rs')
-rw-r--r--src/commands/build.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/commands/build.rs b/src/commands/build.rs
index b653e29..fd50159 100644
--- a/src/commands/build.rs
+++ b/src/commands/build.rs
@@ -354,12 +354,13 @@ pub async fn build(
writeln!(
outlock,
"Last {} lines of Job {}",
- number_log_lines, job_uuid
+ number_log_lines, job_uuid.to_string().red()
)?;
writeln!(
outlock,
"for package {} {}\n\n",
- data.1.name, data.1.version
+ data.1.name.to_string().red(),
+ data.1.version.to_string().red()
)?;
let parsed_log = crate::log::ParsedLog::build_from(&data.0.log_text)?;
@@ -395,7 +396,8 @@ pub async fn build(
}
})
.try_for_each(|(i, line)| {
- writeln!(outlock, "{:>4} | {}", i, line).map_err(Error::from)
+ let lineno = format!("{:>4} | ", i).bright_black();
+ writeln!(outlock, "{}{}", lineno, line).map_err(Error::from)
})?;
writeln!(outlock, "\n\n")?;