mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
chore: use lowercase logging
This commit is contained in:
parent
1b3cc4c5e7
commit
26547f0123
@ -30,7 +30,7 @@ impl DaemonClient {
|
|||||||
pub fn connect() -> anyhow::Result<Self> {
|
pub fn connect() -> anyhow::Result<Self> {
|
||||||
let path =
|
let path =
|
||||||
get_socket_path().context("Could not connect to daemon: socket file not found")?;
|
get_socket_path().context("Could not connect to daemon: socket file not found")?;
|
||||||
info!("Connecting to service at {path:?}");
|
info!("connecting to service at {path:?}");
|
||||||
let stream = UnixStream::connect(path).context("Could not connect to daemon")?;
|
let stream = UnixStream::connect(path).context("Could not connect to daemon")?;
|
||||||
Self::from_stream(stream, false)
|
Self::from_stream(stream, false)
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ impl GpuController {
|
|||||||
|
|
||||||
*notify_guard = Some((notify, handle, curve));
|
*notify_guard = Some((notify, handle, curve));
|
||||||
|
|
||||||
info!(
|
debug!(
|
||||||
"started fan control with interval {}ms",
|
"started fan control with interval {}ms",
|
||||||
interval.as_millis()
|
interval.as_millis()
|
||||||
);
|
);
|
||||||
|
@ -11,11 +11,10 @@ use header::Header;
|
|||||||
use lact_client::schema::DeviceStats;
|
use lact_client::schema::DeviceStats;
|
||||||
use lact_client::DaemonClient;
|
use lact_client::DaemonClient;
|
||||||
use root_stack::RootStack;
|
use root_stack::RootStack;
|
||||||
use std::fs;
|
|
||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use tracing::{debug, error, info, trace, warn};
|
use tracing::{debug, error, trace, warn};
|
||||||
|
|
||||||
// In ms
|
// In ms
|
||||||
const STATS_POLL_INTERVAL: u64 = 250;
|
const STATS_POLL_INTERVAL: u64 = 250;
|
||||||
@ -85,7 +84,7 @@ impl App {
|
|||||||
|
|
||||||
|
|
||||||
app.header.connect_gpu_selection_changed(clone!(@strong app, @strong current_gpu_id => move |gpu_id| {
|
app.header.connect_gpu_selection_changed(clone!(@strong app, @strong current_gpu_id => move |gpu_id| {
|
||||||
info!("GPU Selection changed");
|
debug!("GPU Selection changed");
|
||||||
app.set_info(&gpu_id);
|
app.set_info(&gpu_id);
|
||||||
*current_gpu_id.write().unwrap() = gpu_id;
|
*current_gpu_id.write().unwrap() = gpu_id;
|
||||||
}));
|
}));
|
||||||
@ -160,7 +159,7 @@ impl App {
|
|||||||
.expect("Could not fetch info");
|
.expect("Could not fetch info");
|
||||||
let info = info_buf.inner().unwrap();
|
let info = info_buf.inner().unwrap();
|
||||||
|
|
||||||
trace!("Setting info {info:?}");
|
trace!("setting info {info:?}");
|
||||||
|
|
||||||
self.root_stack.info_page.set_info(&info);
|
self.root_stack.info_page.set_info(&info);
|
||||||
|
|
||||||
@ -199,12 +198,12 @@ impl App {
|
|||||||
Ok(clocks_buf) => match clocks_buf.inner() {
|
Ok(clocks_buf) => match clocks_buf.inner() {
|
||||||
Ok(info) => info.table,
|
Ok(info) => info.table,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
debug!("Could not extract clocks info: {err:?}");
|
debug!("could not extract clocks info: {err:?}");
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
debug!("Could not fetch clocks info: {err:?}");
|
debug!("could not fetch clocks info: {err:?}");
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -213,7 +212,7 @@ impl App {
|
|||||||
// Show apply button on setting changes
|
// Show apply button on setting changes
|
||||||
// This is done here because new widgets may appear after applying settings (like fan curve points) which should be connected
|
// This is done here because new widgets may appear after applying settings (like fan curve points) which should be connected
|
||||||
let show_revealer = clone!(@strong self.apply_revealer as apply_revealer => move || {
|
let show_revealer = clone!(@strong self.apply_revealer as apply_revealer => move || {
|
||||||
debug!("Settings changed, showing apply button");
|
debug!("settings changed, showing apply button");
|
||||||
apply_revealer.show();
|
apply_revealer.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -261,7 +260,7 @@ impl App {
|
|||||||
clone!(@strong self.root_stack as root_stack => move |msg| {
|
clone!(@strong self.root_stack as root_stack => move |msg| {
|
||||||
match msg {
|
match msg {
|
||||||
GuiUpdateMsg::GpuStats(stats) => {
|
GuiUpdateMsg::GpuStats(stats) => {
|
||||||
trace!("New stats received, updating {stats:?}");
|
trace!("new stats received, updating {stats:?}");
|
||||||
root_stack.info_page.set_stats(&stats);
|
root_stack.info_page.set_stats(&stats);
|
||||||
root_stack.thermals_page.set_stats(&stats, false);
|
root_stack.thermals_page.set_stats(&stats, false);
|
||||||
root_stack.oc_page.set_stats(&stats, false);
|
root_stack.oc_page.set_stats(&stats, false);
|
||||||
@ -276,7 +275,7 @@ impl App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn apply_settings(&self, current_gpu_id: Arc<RwLock<String>>) -> anyhow::Result<()> {
|
fn apply_settings(&self, current_gpu_id: Arc<RwLock<String>>) -> anyhow::Result<()> {
|
||||||
info!("Applying settings");
|
debug!("applying settings");
|
||||||
|
|
||||||
let gpu_id = current_gpu_id.read().unwrap();
|
let gpu_id = current_gpu_id.read().unwrap();
|
||||||
|
|
||||||
@ -316,7 +315,7 @@ impl App {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let thermals_settings = self.root_stack.thermals_page.get_thermals_settings();
|
let thermals_settings = self.root_stack.thermals_page.get_thermals_settings();
|
||||||
debug!("Applying thermal settings: {thermals_settings:?}");
|
debug!("applying thermal settings: {thermals_settings:?}");
|
||||||
|
|
||||||
self.daemon_client
|
self.daemon_client
|
||||||
.set_fan_control(
|
.set_fan_control(
|
||||||
|
@ -145,7 +145,7 @@ impl VulkanInfoFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_info(&self, vulkan_info: &VulkanInfo) {
|
pub fn set_info(&self, vulkan_info: &VulkanInfo) {
|
||||||
trace!("Setting vulkan info: {:?}", vulkan_info);
|
trace!("setting vulkan info: {:?}", vulkan_info);
|
||||||
|
|
||||||
self.device_name_label
|
self.device_name_label
|
||||||
.set_markup(&format!("<b>{}</b>", vulkan_info.device_name));
|
.set_markup(&format!("<b>{}</b>", vulkan_info.device_name));
|
||||||
|
@ -75,7 +75,7 @@ impl OcPage {
|
|||||||
self.clocks_frame.show();
|
self.clocks_frame.show();
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
warn!("Got invalid clocks table: {err:?}");
|
warn!("got invalid clocks table: {err:?}");
|
||||||
self.clocks_frame.hide();
|
self.clocks_frame.hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -29,8 +29,8 @@ fn create_connection() -> anyhow::Result<DaemonClient> {
|
|||||||
match DaemonClient::connect() {
|
match DaemonClient::connect() {
|
||||||
Ok(connection) => Ok(connection),
|
Ok(connection) => Ok(connection),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
info!("Could not connect to socket: {err}");
|
info!("could not connect to socket: {err}");
|
||||||
info!("Using a local daemon");
|
info!("using a local daemon");
|
||||||
|
|
||||||
let (server_stream, client_stream) = UnixStream::pair()?;
|
let (server_stream, client_stream) = UnixStream::pair()?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user