mirror of
https://github.com/anthonyoteri/dredge.git
synced 2026-06-05 15:26:53 -04:00
Merge pull request #45 from anthonyoteri/replace-femme-with-simple-logger
Replace Femme with SimpleLogger
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ categories = [
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
async-std = { version = "1.12.0", features = ["async-attributes", "attributes", "tokio1"] }
|
async-std = { version = "1.12.0", features = ["async-attributes", "attributes", "tokio1"] }
|
||||||
clap = { version = "4.4.3", features = ["derive", "env", "wrap_help"] }
|
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"
|
http = "0.2.9"
|
||||||
indoc = "2.0.4"
|
indoc = "2.0.4"
|
||||||
log = "0.4.20"
|
log = "0.4.20"
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ pub enum DredgeError {
|
|||||||
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
IOError(#[from] std::io::Error),
|
IOError(#[from] std::io::Error),
|
||||||
|
|
||||||
|
#[error(transparent)]
|
||||||
|
LoggerError(#[from] log::SetLoggerError),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An error related to the communication with the registry API.
|
/// An error related to the communication with the registry API.
|
||||||
|
|||||||
+7
-1
@@ -19,6 +19,7 @@
|
|||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
|
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
use simple_logger::SimpleLogger;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use crate::cli::Cli;
|
use crate::cli::Cli;
|
||||||
@@ -62,7 +63,12 @@ async fn main() -> Result<(), DredgeError> {
|
|||||||
|
|
||||||
// -- Initialize logging
|
// -- Initialize logging
|
||||||
let log_level = args.log_level;
|
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
|
// -- Parse the given <REGISTRY> argument into a complete URL
|
||||||
let registry_url: Url = parse_registry_arg(&args.registry)?;
|
let registry_url: Url = parse_registry_arg(&args.registry)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user