refactor(wm): reduce noise in info and error logs

This commit is contained in:
LGUG2Z
2024-05-09 19:49:43 -07:00
parent 4802b55452
commit 11acff5236
2 changed files with 5 additions and 7 deletions

View File

@@ -14,7 +14,6 @@ use komorebi_core::config_generation::MatchingRule;
use komorebi_core::config_generation::MatchingStrategy;
use regex::Regex;
use schemars::JsonSchema;
use serde::ser::Error;
use serde::ser::SerializeStruct;
use serde::Deserialize;
use serde::Serialize;
@@ -97,24 +96,23 @@ impl Serialize for Window {
"title",
&self
.title()
.map_err(|_| S::Error::custom("could not get window title"))?,
.unwrap_or_else(|_| String::from("could not get window title")),
)?;
state.serialize_field(
"exe",
&self
.exe()
.map_err(|_| S::Error::custom("could not get window exe"))?,
.unwrap_or_else(|_| String::from("could not get window exe")),
)?;
state.serialize_field(
"class",
&self
.class()
.map_err(|_| S::Error::custom("could not get window class"))?,
.unwrap_or_else(|_| String::from("could not get window class")),
)?;
state.serialize_field(
"rect",
&WindowsApi::window_rect(self.hwnd())
.map_err(|_| S::Error::custom("could not get window rect"))?,
&WindowsApi::window_rect(self.hwnd()).unwrap_or_default(),
)?;
state.end()
}

View File

@@ -566,7 +566,7 @@ impl WindowManager {
target_workspace_idx: usize,
to_move: &mut Vec<EnforceWorkspaceRuleOp>,
) -> () {
tracing::info!(
tracing::trace!(
"{} should be on monitor {}, workspace {}",
window_title,
target_monitor_idx,