diff options
author | boasting-squirrel <boasting.squirrel@gmail.com> | 2019-03-13 18:30:54 +0000 |
---|---|---|
committer | boasting-squirrel <boasting.squirrel@gmail.com> | 2019-03-13 18:30:54 +0000 |
commit | 17ef61a126e81c9ecfd1ebdd89537e854a06cae6 (patch) | |
tree | 24669a4d54650bd6b114012d3b476852ea4b9210 /src/listing.rs | |
parent | upgraded to libflate 0.1.21 (diff) | |
download | miniserve-17ef61a126e81c9ecfd1ebdd89537e854a06cae6.tar.gz miniserve-17ef61a126e81c9ecfd1ebdd89537e854a06cae6.zip |
Switched to standard Rust logging system
Diffstat (limited to 'src/listing.rs')
-rw-r--r-- | src/listing.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/listing.rs b/src/listing.rs index a9f0f19..b820aa4 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -7,7 +7,6 @@ use serde::Deserialize; use std::io; use std::path::Path; use std::time::SystemTime; -use yansi::Color; use crate::archive; use crate::errors; @@ -229,19 +228,14 @@ pub fn directory_listing<S>( } if let Some(compression_method) = &download { - println!( - "{info} Creating an archive ({extension}) of {path}...", - info = Color::Blue.paint("info:").bold(), - extension = Color::White.paint(compression_method.extension()).bold(), - path = Color::White.paint(&dir.path.display().to_string()).bold() + log::info!( + "Creating an archive ({extension}) of {path}...", + extension = compression_method.extension(), + path = &dir.path.display().to_string() ); match archive::create_archive_file(&compression_method, &dir.path) { Ok((filename, content)) => { - println!( - "{success} {file} successfully created !", - success = Color::Green.paint("success:").bold(), - file = Color::White.paint(&filename).bold(), - ); + log::info!("{file} successfully created !", file = &filename); Ok(HttpResponse::Ok() .content_type(compression_method.content_type()) .content_length(content.len() as u64) |