Skip to content

Commit

Permalink
Fixed server verbosity issue with STDERR redirect.
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-kast committed Mar 8, 2021
1 parent 25693de commit 433f93f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "empress"
version = "1.1.1"
version = "1.1.2"
authors = ["rookie1024 <[email protected]>"]
edition = "2018"
description = "A D-Bus MPRIS daemon for controlling media players."
Expand Down
10 changes: 7 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ enum Opts {
long,
parse(from_occurrences),
conflicts_with("quiet"),
conflicts_with("no-quiet"),
conflicts_with("no-quiet")
)]
verbose: usize,
},
Expand Down Expand Up @@ -159,10 +159,14 @@ fn run() -> Result {
let opts = Opts::from_args();

match opts {
Opts::Server { quiet, no_quiet, verbose } => {
Opts::Server {
quiet,
no_quiet,
verbose,
} => {
let mut log_cfg = log_cfg(verbose);

if !(no_quiet || atty::is(atty::Stream::Stderr)) || quiet {
if !(no_quiet || verbose != 0 || atty::is(atty::Stream::Stderr)) || quiet {
log_cfg.filter_level(LevelFilter::Warn);
}

Expand Down

0 comments on commit 433f93f

Please sign in to comment.