Replace femme logger with simple_logger

This commit is contained in:
Anthony Oteri
2023-09-29 15:05:23 -04:00
parent b0239fb049
commit 13ae092b91
3 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ categories = [
[dependencies]
async-std = { version = "1.12.0", features = ["async-attributes", "attributes", "tokio1"] }
clap = { version = "4.4.3", features = ["derive", "env", "wrap_help"] }
femme = "2.2.1"
simple_logger = { version = "4.2.0", features = ["timestamps", "colors", "stderr"] }
http = "0.2.9"
indoc = "2.0.4"
log = "0.4.20"
+3
View File
@@ -32,6 +32,9 @@ pub enum DredgeError {
#[error(transparent)]
IOError(#[from] std::io::Error),
#[error(transparent)]
LoggerError(#[from] log::SetLoggerError),
}
/// An error related to the communication with the registry API.
+7 -1
View File
@@ -19,6 +19,7 @@
use std::io::{self, Write};
use clap::Parser;
use simple_logger::SimpleLogger;
use url::Url;
use crate::cli::Cli;
@@ -62,7 +63,12 @@ async fn main() -> Result<(), DredgeError> {
// -- Initialize logging
let log_level = args.log_level;
femme::with_level(log::LevelFilter::from(log_level));
SimpleLogger::new()
.with_colors(true)
.with_utc_timestamps()
.with_level(log_level.into())
.env()
.init()?;
// -- Parse the given <REGISTRY> argument into a complete URL
let registry_url: Url = parse_registry_arg(&args.registry)?;