Add macros for logging.

This commit is contained in:
2026-02-22 10:09:53 -05:00
parent c21ede292c
commit be969ef335
21 changed files with 246 additions and 79 deletions

View File

@@ -8,7 +8,7 @@ use crate::tui::component::Focus::Inactive;
use Focus::Active;
use anyhow::Result;
use libclide::theme::colors::Colors;
use log::trace;
use libclide_macros::log_id;
use ratatui::crossterm::event::{Event, KeyEvent, MouseEvent};
use ratatui::style::Color;
@@ -63,6 +63,7 @@ pub trait Component {
}
#[derive(Debug, Clone, Default)]
#[log_id]
pub struct ComponentState {
pub(crate) focus: Focus,
pub(crate) vis: Visibility,
@@ -75,7 +76,7 @@ impl ComponentState {
}
fn new() -> Self {
trace!(target:Self::id(), "Building {}", Self::id());
libclide::trace!(target:Self::id(), "Building {}", Self::id());
Self {
focus: Active,
vis: Visibility::Visible,