1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 10:41:03 +02:00

refactor(image): add debug logging

This commit is contained in:
Jake Stanger 2024-03-14 22:36:30 +00:00
parent 00a6a84ca6
commit b912619d61
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -11,7 +11,7 @@ use gtk::{IconLookupFlags, IconTheme};
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
#[cfg(feature = "http")] #[cfg(feature = "http")]
use tokio::sync::mpsc; use tokio::sync::mpsc;
use tracing::warn; use tracing::{debug, warn};
cfg_if!( cfg_if!(
if #[cfg(feature = "http")] { if #[cfg(feature = "http")] {
@ -45,6 +45,7 @@ impl<'a> ImageProvider<'a> {
/// but no other check is performed. /// but no other check is performed.
pub fn parse(input: &str, theme: &'a IconTheme, use_fallback: bool, size: i32) -> Option<Self> { pub fn parse(input: &str, theme: &'a IconTheme, use_fallback: bool, size: i32) -> Option<Self> {
let location = Self::get_location(input, theme, size, use_fallback, 0)?; let location = Self::get_location(input, theme, size, use_fallback, 0)?;
debug!("Resolved {input} --> {location:?} (size: {size})");
Some(Self { location, size }) Some(Self { location, size })
} }