feat: hack get in control of log level

I haven't found a good way of enabling all of mine, but disabling all of theirs.
as such right now it is a deny list, where some entries reqwest,cliff,hyper is set to
error, and our own is controlled via.

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-02 00:13:34 +02:00
parent f75e839759
commit b4acb55d0c
5 changed files with 37 additions and 3 deletions

View File

@@ -52,6 +52,15 @@ config-stdin will consume stdin until the channel is closed via. EOF"
default_value = "gitea"
)]
pub engine: RemoteEngine,
#[arg(
env = "CUDDLE_PLEASE_LOG_LEVEL",
long,
global = true,
help_heading = "Global",
default_value = "none"
)]
pub log_level: LogLevel,
}
#[derive(ValueEnum, Clone, Debug)]
@@ -59,3 +68,11 @@ pub enum RemoteEngine {
Local,
Gitea,
}
#[derive(ValueEnum, Clone, Debug)]
pub enum LogLevel {
None,
Trace,
Debug,
Info,
Error,
}

View File

@@ -6,7 +6,7 @@ mod local_git_client;
mod ui;
mod versioning;
pub use args::{GlobalArgs, RemoteEngine, StdinFn};
pub use args::{GlobalArgs, LogLevel, RemoteEngine, StdinFn};
pub use cliff::{changelog_parser, ChangeLogBuilder};
pub use git_client::VcsClient;
pub use gitea_client::{Commit, DynRemoteGitClient, GiteaClient, RemoteGitEngine, Tag};