Skip to content

Commit

Permalink
log: silence symphonia info logs
Browse files Browse the repository at this point in the history
  • Loading branch information
eladyn committed Dec 27, 2024
1 parent 7a14683 commit c523910
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,18 @@ fn setup_logger(log_target: LogTarget, verbose: bool) -> eyre::Result<()> {

let mut logger = fern::Dispatch::new().level(log_level);

if cfg!(feature = "dbus_mpris") && !verbose {
logger = logger.level_for("rspotify_http", LevelFilter::Warn);
}
logger = if verbose {
logger.format(|out, message, record| {
out.finish(format_args!(
"[{} {}] {}",
record.level(),
record.target(),
message
))
})
} else {
logger.level_for("symphonia_format_ogg::demuxer", LevelFilter::Warn)
};

let logger = match log_target {
LogTarget::Terminal => logger.chain(std::io::stdout()),
Expand Down

0 comments on commit c523910

Please sign in to comment.