From 4e80dcf731396527da1cd16d7af5a16424622fde Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Mon, 2 Feb 2026 21:50:01 -0600 Subject: [PATCH] chore: reduce log noise by changing frequent commands to debug level Move high-frequency API read commands from log::info! to log::debug!: - get_artist, get_artist_detail, get_artist_tracks, get_artist_albums - get_featured_albums, get_genres - get_user_playlists, get_playlist, search_playlists - get_favorites, get_tracks_by_ids, get_track_info, get_current_user_id - playlist_get_all_settings, playlist_get_all_stats - playlist_get_all_local_track_counts, get_playlist_folders User action commands (create, delete, add, remove) remain at info level. --- src-tauri/src/commands/favorites.rs | 2 +- src-tauri/src/commands/playlist.rs | 12 ++++++------ src-tauri/src/commands/search.rs | 12 ++++++------ src-tauri/src/library/commands.rs | 8 ++++---- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src-tauri/src/commands/favorites.rs b/src-tauri/src/commands/favorites.rs index 4d4b1d2d9..9b266e9d1 100644 --- a/src-tauri/src/commands/favorites.rs +++ b/src-tauri/src/commands/favorites.rs @@ -14,7 +14,7 @@ pub async fn get_favorites( offset: Option, state: State<'_, AppState>, ) -> Result { - log::info!("Command: get_favorites type={} limit={:?} offset={:?}", fav_type, limit, offset); + log::debug!("Command: get_favorites type={} limit={:?} offset={:?}", fav_type, limit, offset); let client = state.client.lock().await; client diff --git a/src-tauri/src/commands/playlist.rs b/src-tauri/src/commands/playlist.rs index 522a57a13..c7eb1d8e1 100644 --- a/src-tauri/src/commands/playlist.rs +++ b/src-tauri/src/commands/playlist.rs @@ -19,7 +19,7 @@ pub struct TrackInfo { pub async fn get_user_playlists( state: State<'_, AppState>, ) -> Result, String> { - log::info!("Command: get_user_playlists"); + log::debug!("Command: get_user_playlists"); let client = state.client.lock().await; client @@ -34,7 +34,7 @@ pub async fn get_playlist( playlist_id: u64, state: State<'_, AppState>, ) -> Result { - log::info!("Command: get_playlist {}", playlist_id); + log::debug!("Command: get_playlist {}", playlist_id); let client = state.client.lock().await; client @@ -51,7 +51,7 @@ pub async fn search_playlists( offset: Option, state: State<'_, AppState>, ) -> Result, String> { - log::info!("Command: search_playlists \"{}\" limit={:?} offset={:?}", query, limit, offset); + log::debug!("Command: search_playlists \"{}\" limit={:?} offset={:?}", query, limit, offset); let client = state.client.lock().await; client @@ -148,7 +148,7 @@ pub async fn get_tracks_by_ids( track_ids: Vec, state: State<'_, AppState>, ) -> Result, String> { - log::info!("Command: get_tracks_by_ids ({} tracks)", track_ids.len()); + log::debug!("Command: get_tracks_by_ids ({} tracks)", track_ids.len()); let client = state.client.lock().await; let mut tracks = Vec::new(); @@ -169,7 +169,7 @@ pub async fn get_tracks_by_ids( /// Get the current user's Qobuz ID #[tauri::command] pub async fn get_current_user_id(state: State<'_, AppState>) -> Result, String> { - log::info!("Command: get_current_user_id"); + log::debug!("Command: get_current_user_id"); let client = state.client.lock().await; Ok(client.get_user_id().await) @@ -235,7 +235,7 @@ pub async fn get_track_info( track_id: u64, state: State<'_, AppState>, ) -> Result { - log::info!("Command: get_track_info {}", track_id); + log::debug!("Command: get_track_info {}", track_id); let client = state.client.lock().await; let track = client diff --git a/src-tauri/src/commands/search.rs b/src-tauri/src/commands/search.rs index 03767c3bb..6177ee90e 100644 --- a/src-tauri/src/commands/search.rs +++ b/src-tauri/src/commands/search.rs @@ -330,7 +330,7 @@ pub async fn get_featured_albums( genre_id: Option, state: State<'_, AppState>, ) -> Result, String> { - log::info!( + log::debug!( "Command: get_featured_albums type={} limit={:?} offset={:?} genre_id={:?}", featured_type, limit, @@ -383,7 +383,7 @@ pub async fn get_artist( state: State<'_, AppState>, cache_state: State<'_, ApiCacheState>, ) -> Result { - log::info!("Command: get_artist {}", artist_id); + log::debug!("Command: get_artist {}", artist_id); // Get current locale let locale = { @@ -428,7 +428,7 @@ pub async fn get_artist_detail( artist_id: u64, state: State<'_, AppState>, ) -> Result { - log::info!("Command: get_artist_detail {}", artist_id); + log::debug!("Command: get_artist_detail {}", artist_id); let client = state.client.lock().await; client @@ -445,7 +445,7 @@ pub async fn get_artist_tracks( offset: Option, state: State<'_, AppState>, ) -> Result { - log::info!( + log::debug!( "Command: get_artist_tracks {} limit={:?} offset={:?}", artist_id, limit, @@ -467,7 +467,7 @@ pub async fn get_artist_albums( offset: Option, state: State<'_, AppState>, ) -> Result { - log::info!( + log::debug!( "Command: get_artist_albums {} limit={:?} offset={:?}", artist_id, limit, @@ -548,7 +548,7 @@ pub async fn get_genres( parent_id: Option, state: State<'_, AppState>, ) -> Result, String> { - log::info!("Command: get_genres parent_id={:?}", parent_id); + log::debug!("Command: get_genres parent_id={:?}", parent_id); let client = state.client.lock().await; client diff --git a/src-tauri/src/library/commands.rs b/src-tauri/src/library/commands.rs index dd2fef685..da1b06e9b 100644 --- a/src-tauri/src/library/commands.rs +++ b/src-tauri/src/library/commands.rs @@ -1352,7 +1352,7 @@ pub async fn playlist_get_local_tracks_with_position( pub async fn playlist_get_all_local_track_counts( state: State<'_, LibraryState>, ) -> Result, String> { - log::info!("Command: playlist_get_all_local_track_counts"); + log::debug!("Command: playlist_get_all_local_track_counts"); let db = state.db.lock().await; db.get_all_playlist_local_track_counts() @@ -1377,7 +1377,7 @@ pub async fn playlist_clear_local_tracks( pub async fn playlist_get_all_settings( state: State<'_, LibraryState>, ) -> Result, String> { - log::info!("Command: playlist_get_all_settings"); + log::debug!("Command: playlist_get_all_settings"); let db = state.db.lock().await; db.get_all_playlist_settings() @@ -1469,7 +1469,7 @@ pub async fn playlist_get_stats( pub async fn playlist_get_all_stats( state: State<'_, LibraryState>, ) -> Result, String> { - log::info!("Command: playlist_get_all_stats"); + log::debug!("Command: playlist_get_all_stats"); let db = state.db.lock().await; db.get_all_playlist_stats() @@ -2657,7 +2657,7 @@ pub async fn create_playlist_folder( pub async fn get_playlist_folders( state: State<'_, LibraryState>, ) -> Result, String> { - log::info!("Command: get_playlist_folders"); + log::debug!("Command: get_playlist_folders"); let db = state.db.lock().await; db.get_all_playlist_folders().map_err(|e| e.to_string())