From 09e247a38789993c7c40051d06cd21d663a0a4ac Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Tue, 28 Feb 2023 08:07:47 +0200 Subject: [PATCH] chore: add more debug logs --- lact-daemon/src/server/mod.rs | 5 +++-- lact-gui/src/app/root_stack/oc_page/clocks_frame.rs | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lact-daemon/src/server/mod.rs b/lact-daemon/src/server/mod.rs index ae5b9255..10625ff6 100644 --- a/lact-daemon/src/server/mod.rs +++ b/lact-daemon/src/server/mod.rs @@ -8,7 +8,7 @@ use crate::{config::Config, socket}; use anyhow::Context; use lact_schema::{Pong, Request, Response, SystemInfo}; use serde::Serialize; -use std::{fs, process::Command}; +use std::{fmt::Debug, fs, process::Command}; use tokio::{ io::{AsyncBufReadExt, AsyncWriteExt, BufReader}, net::{UnixListener, UnixStream}, @@ -98,7 +98,8 @@ async fn handle_request<'a>(request: Request<'a>, handler: &'a Handler) -> anyho } } -fn ok_response(data: T) -> anyhow::Result> { +fn ok_response(data: T) -> anyhow::Result> { + debug!("responding with {data:?}"); Ok(serde_json::to_vec(&Response::Ok(data))?) } diff --git a/lact-gui/src/app/root_stack/oc_page/clocks_frame.rs b/lact-gui/src/app/root_stack/oc_page/clocks_frame.rs index dead5f30..b20c64c9 100644 --- a/lact-gui/src/app/root_stack/oc_page/clocks_frame.rs +++ b/lact-gui/src/app/root_stack/oc_page/clocks_frame.rs @@ -3,6 +3,7 @@ use glib::clone; use gtk::prelude::*; use gtk::*; use lact_client::schema::{ClocksTable, ClocksTableGen}; +use tracing::debug; const VOLTAGE_OFFSET_RANGE: f64 = 250.0; const WARNING_TEXT: &str = "Warning: changing these values may lead to system instability and potentially damage your hardware!"; @@ -67,6 +68,8 @@ impl ClocksFrame { } pub fn set_table(&self, table: ClocksTableGen) -> anyhow::Result<()> { + debug!("using clocks table {table:?}"); + // The upper value "0.0" is used to hide the adjustment when info is not available if let Some((current_sclk_max, sclk_min, sclk_max)) = extract_value_and_range(&table, |table| {