pub struct DebugLogger { /* private fields */ }Expand description
Debug logger for development and troubleshooting
Writes debug information to a temporary log file when enabled.
Can be activated through configuration (debug = true) or
environment variable (CCS_DEBUG=1).
§Log Location
- Unix/Linux:
/tmp/claude-code-statusline.log - Windows:
%TEMP%\claude-code-statusline.log - macOS:
/var/folders/.../claude-code-statusline.log
Implementations§
Source§impl DebugLogger
impl DebugLogger
Sourcepub fn new(enabled: bool) -> Self
pub fn new(enabled: bool) -> Self
Creates a new DebugLogger instance
§Arguments
enabled- Whether debug logging is enabled in configuration
§Environment Variables
CCS_DEBUG=1- Forces debug logging regardless of config
§Examples
use claude_code_statusline_core::debug::DebugLogger;
let logger = DebugLogger::new(true);
logger.log("Debug message");Sourcepub fn log_stderr(&self, message: &str)
pub fn log_stderr(&self, message: &str)
Log to stderr if debug mode is enabled
Sourcepub fn log_execution_start(&self)
pub fn log_execution_start(&self)
Log a new execution marker
Sourcepub fn log_config(&self, debug: bool, command_timeout: u64)
pub fn log_config(&self, debug: bool, command_timeout: u64)
Log configuration information
Sourcepub fn log_success(&self, model: &str, cwd: &str)
pub fn log_success(&self, model: &str, cwd: &str)
Log successful parse
Sourcepub fn log_prompt(&self, prompt: &str)
pub fn log_prompt(&self, prompt: &str)
Log generated prompt
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if debug mode is enabled
Auto Trait Implementations§
impl Freeze for DebugLogger
impl RefUnwindSafe for DebugLogger
impl Send for DebugLogger
impl Sync for DebugLogger
impl Unpin for DebugLogger
impl UnsafeUnpin for DebugLogger
impl UnwindSafe for DebugLogger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more