pub struct InvalidCommandLogger { /* private fields */ }Expand description
Logger for invalid or unrecognized CLI commands.
Writes JSONL entries to
~/.config/ito/logs/invalid_commands/v1/projects/{project_id}/{session_id}.jsonl.
Each entry captures the full command that was attempted and the error
message, enabling downstream analysis of how agents invoke Ito incorrectly.
Implementations§
Source§impl InvalidCommandLogger
impl InvalidCommandLogger
Sourcepub fn new(
config_dir: Option<PathBuf>,
project_root: &Path,
ito_path: Option<&Path>,
ito_version: &str,
) -> Option<Self>
pub fn new( config_dir: Option<PathBuf>, project_root: &Path, ito_path: Option<&Path>, ito_version: &str, ) -> Option<Self>
Create a logger for invalid commands.
Returns None when telemetry is disabled or the config directory
is unavailable.
Sourcepub fn log_invalid_command(&self, raw_args: &[String], error_message: &str)
pub fn log_invalid_command(&self, raw_args: &[String], error_message: &str)
Log an invalid command invocation.
raw_args is the full list of arguments as passed to the CLI.
error_message is the user-facing error text.
Trait Implementations§
Source§impl Clone for InvalidCommandLogger
impl Clone for InvalidCommandLogger
Source§fn clone(&self) -> InvalidCommandLogger
fn clone(&self) -> InvalidCommandLogger
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InvalidCommandLogger
impl RefUnwindSafe for InvalidCommandLogger
impl Send for InvalidCommandLogger
impl Sync for InvalidCommandLogger
impl Unpin for InvalidCommandLogger
impl UnsafeUnpin for InvalidCommandLogger
impl UnwindSafe for InvalidCommandLogger
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