mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-08 20:45:29 +00:00
remove silent flag in favour of RUST_LOG
This commit is contained in:
parent
2934350485
commit
d24db63583
4 changed files with 12 additions and 14 deletions
17
src/main.rs
17
src/main.rs
|
|
@ -28,15 +28,11 @@ use {
|
|||
};
|
||||
|
||||
fn main() -> Result {
|
||||
if !ARGS.silent {
|
||||
env_logger::Builder::new()
|
||||
// turn off logging for other modules
|
||||
.filter_level(log::LevelFilter::Off)
|
||||
// turn on logging for agate
|
||||
.filter_module("agate", log::LevelFilter::Info)
|
||||
.parse_default_env()
|
||||
.init();
|
||||
}
|
||||
env_logger::Builder::from_env(
|
||||
// by default only turn on logging for agate
|
||||
env_logger::Env::default().default_filter_or("agate=info"),
|
||||
)
|
||||
.init();
|
||||
Runtime::new()?.block_on(async {
|
||||
let default = PresetMeta::Parameters(
|
||||
ARGS.language
|
||||
|
|
@ -79,7 +75,6 @@ struct Args {
|
|||
certs: Arc<certificates::CertStore>,
|
||||
hostnames: Vec<Host>,
|
||||
language: Option<String>,
|
||||
silent: bool,
|
||||
serve_secret: bool,
|
||||
log_ips: bool,
|
||||
only_tls13: bool,
|
||||
|
|
@ -119,7 +114,6 @@ fn args() -> Result<Args> {
|
|||
"RFC 4646 Language code for text/gemini documents",
|
||||
"LANG",
|
||||
);
|
||||
opts.optflag("s", "silent", "Disable logging output");
|
||||
opts.optflag("h", "help", "Print this help text and exit.");
|
||||
opts.optflag("V", "version", "Print version information and exit.");
|
||||
opts.optflag(
|
||||
|
|
@ -173,7 +167,6 @@ fn args() -> Result<Args> {
|
|||
certs,
|
||||
hostnames,
|
||||
language: matches.opt_str("lang"),
|
||||
silent: matches.opt_present("s"),
|
||||
serve_secret: matches.opt_present("serve-secret"),
|
||||
log_ips: matches.opt_present("log-ip"),
|
||||
only_tls13: matches.opt_present("only-tls13"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue