Skip to content

Commit 09953f5

Browse files
committed
Init verbose logging functions
1 parent fe7358f commit 09953f5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/console.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,24 @@ pub fn exit_err(message: impl Into<String>) -> ! {
150150
exit(1);
151151
}
152152

153+
pub fn print_verbose(settings: &CommandLineSettings, message: impl Into<String>) {
154+
if settings.verbose {
155+
println!("{}", message.into());
156+
}
157+
}
158+
159+
pub fn print_step_verbose(settings: &CommandLineSettings, message: impl Into<String>) {
160+
if settings.verbose {
161+
print_step(message);
162+
}
163+
}
164+
165+
pub fn print_success_verbose(settings: &CommandLineSettings, message: impl Into<String>) {
166+
if settings.verbose {
167+
print_success(message);
168+
}
169+
}
170+
153171
pub fn print_warn(message: impl Into<String>) {
154172
println!("{} {}", Style::new().fg(Yellow).bold().paint("Warning:"), message.into());
155173
}

0 commit comments

Comments
 (0)