From 4e33e67e9623ba933e5459352cd64e134933ce18 Mon Sep 17 00:00:00 2001 From: rootiest Date: Fri, 10 Apr 2026 16:47:25 -0400 Subject: [PATCH] fix(volume): log initial volume level at INFO on startup Volume changes were only logged at DEBUG (requires -v), leaving the volume monitor completely silent at the default log level. The first reading is now logged at INFO so users can confirm the monitor is running and see the current level without needing verbose output. --- src/volume.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/volume.rs b/src/volume.rs index 94e0f69..10e0f90 100644 --- a/src/volume.rs +++ b/src/volume.rs @@ -17,7 +17,7 @@ use std::process::Command; use std::thread; use std::time::Duration; -use log::{debug, error, warn}; +use log::{debug, error, info, warn}; use crate::keyboard::Keyboard; use crate::protocol::{Packet, DEV_HOST}; @@ -34,7 +34,11 @@ pub fn monitor(keyboards: Vec) { match query_volume() { Some(vol) if last != Some(vol) => { - debug!("Volume changed: {}%", vol); + if last.is_none() { + info!("Volume monitor started: {}%", vol); + } else { + debug!("Volume changed: {}%", vol); + } last = Some(vol); broadcast(Packet::volume(DEV_HOST, vol), &keyboards); }