Skip to main content

Crate agentic_logger

Crate agentic_logger 

Source
Expand description

§agentic-logger (Rust)

Structured logging SDK for Coding Agents. Emits byte-compatible JSONL that the AgenticLogger Python query layer (cli / mcp_server) reads without any conversion.

@contract: sdks/INTERCHANGE.md

use agentic_logger::{AgentLogger, ErrorCode};
use serde_json::json;

let logger = AgentLogger::new("my_agent", Some("build"), "./logs", None).unwrap();
logger.info("Processing started", Some("parser")).ok();
logger.tool_call("bash", "npm install", 0, 1234, None, None, None, None, None).ok();
logger.error("Build failed", Some("build"), ErrorCode::ExecNonZero, None).ok();
logger.info_full("with ctx", Some("net"), None, None, None, Some(json!({"endpoint": "/x"}))).ok();

Structs§

AgentLogger
The structured logger. One instance == one run == one JSONL file.

Enums§

ErrorCode
UPPER_SNAKE error codes. Implements Display so it serializes as the raw string value (no quoting wrapper).