mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 06:41:03 +02:00
chore: add trace logging to volume module
This commit is contained in:
parent
5a7ad5675d
commit
76ca6115a3
4 changed files with 30 additions and 3 deletions
|
@ -12,6 +12,7 @@ use gtk::{Button, CellRendererText, ComboBoxText, Label, Orientation, Scale, Tog
|
|||
use serde::Deserialize;
|
||||
use std::collections::HashMap;
|
||||
use tokio::sync::mpsc;
|
||||
use tracing::trace;
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
|
||||
|
@ -159,12 +160,16 @@ impl Module<Button> for VolumeModule {
|
|||
sinks.iter().cloned().collect::<Vec<_>>()
|
||||
};
|
||||
|
||||
trace!("initial syncs: {sinks:?}");
|
||||
|
||||
let inputs = {
|
||||
let inputs = client.sink_inputs();
|
||||
let inputs = lock!(inputs);
|
||||
inputs.iter().cloned().collect::<Vec<_>>()
|
||||
};
|
||||
|
||||
trace!("initial inputs: {inputs:?}");
|
||||
|
||||
for sink in sinks {
|
||||
send_async!(tx, ModuleUpdateEvent::Update(Event::AddSink(sink)));
|
||||
}
|
||||
|
@ -178,6 +183,7 @@ impl Module<Button> for VolumeModule {
|
|||
|
||||
// recv loop
|
||||
while let Ok(event) = rx.recv().await {
|
||||
trace!("received event: {event:?}");
|
||||
send_async!(tx, ModuleUpdateEvent::Update(event));
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue