nixpacks/nixpacks/logger.rs
1use colored::Colorize;
2
3/// Used for reporting Docker build information to stdout.
4pub struct Logger {}
5
6impl Logger {
7 pub fn new() -> Logger {
8 Logger {}
9 }
10
11 /// Pretty-print the given log section title.
12 pub fn log_section(&self, msg: &str) {
13 println!("=== {} ===", msg.magenta().bold());
14 }
15
16 /// Pretty-print the given log line.
17 pub fn log_step(&self, msg: &str) {
18 println!("=> {msg}");
19 }
20}
21
22impl Default for Logger {
23 fn default() -> Self {
24 Self::new()
25 }
26}