Add macros for logging.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user