mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 19:34:24 +02:00
chore(system tray): add debug logging
This commit is contained in:
parent
1e1d65ae49
commit
8e99fd4d0f
1 changed files with 5 additions and 1 deletions
|
@ -10,7 +10,7 @@ use stray::message::{NotifierItemCommand, NotifierItemMessage};
|
|||
use stray::StatusNotifierWatcher;
|
||||
use tokio::spawn;
|
||||
use tokio::sync::{broadcast, mpsc};
|
||||
use tracing::error;
|
||||
use tracing::{debug, error, trace};
|
||||
|
||||
type Tray = BTreeMap<String, (Box<StatusNotifierItem>, Option<TrayMenu>)>;
|
||||
|
||||
|
@ -38,6 +38,8 @@ impl TrayEventReceiver {
|
|||
|
||||
spawn(async move {
|
||||
while let Ok(message) = host.recv().await {
|
||||
trace!("Received message: {message:?} ");
|
||||
|
||||
send!(b_tx, message.clone());
|
||||
let mut tray = lock!(tray);
|
||||
match message {
|
||||
|
@ -46,9 +48,11 @@ impl TrayEventReceiver {
|
|||
item,
|
||||
menu,
|
||||
} => {
|
||||
debug!("Adding item with address '{address}'");
|
||||
tray.insert(address, (item, menu));
|
||||
}
|
||||
NotifierItemMessage::Remove { address } => {
|
||||
debug!("Removing item with address '{address}'");
|
||||
tray.remove(&address);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue