Skip to main content

LogicGridLoggerOptions

Every flag controls a single class of log line. Defaults give you a useful out-of-the-box experience — most users only flip ShowLlmMessages and ShowLlmRawResponse on while debugging, and ShowMapProgress for verbose map-reduce work.

var opts = new LogicGridLoggerOptions
{
// tweak whichever you care about
ShowLlmMessages = true,
};

var ctx = new AgentContext().WithLogging(opts);

Reference

PropertyDefaultEffect
ShowAdminSelectiontrueLoop N — selected agent: … line per group-chat / graph step.
ShowAgentInputtrue[Agent] started | input: … line at the start of each agent run.
ShowAgentOutputtrueoutput: … segment in the agent-completed line.
ShowLlmMessagesfalseLLM call — model: … | messages: N debug line on every LLM round-trip. Verbose.
ShowLlmRawResponsefalseresponse: … segment in the LLM-completed line. Use when validating output parsing.
ShowToolCallstruetool call: … and tool result: … lines for every tool invocation.
ShowRetriestrue[Agent] retry N — error line on every retry attempt.
ShowTokenUsagetrueN tokens segment on agent and LLM completion lines.
ShowTimingstrueNms segment on agent, LLM, and tool completion lines.
ShowAdminSelectingfalseLoop N — selecting next agent from: … debug line. Off by default; the matching "selected" event is already logged.
ShowParallelLifecycletrueParallel fan-out and Parallel fan-in lines.
ShowMapProgressfalseMap I/N | … line per item. Off by default — chatty for large lists.
ShowReflexionIterationstrueReflexion iter N — approved/revise | feedback: … line per round.
ShowGraphTraversaltrueLoop N — edge X → Y and Graph terminated at … lines.
ShowBudgettrueBudget warning and Budget exceeded lines. Strongly recommended on — silent breaches are a footgun.

Production

var prod = new LogicGridLoggerOptions
{
ShowLlmMessages = false,
ShowLlmRawResponse = false,
ShowMapProgress = false,
// everything else default
};

Enough to reconstruct what happened, no per-prompt noise.

Development

var dev = new LogicGridLoggerOptions
{
ShowLlmMessages = true,
ShowLlmRawResponse = true,
ShowMapProgress = true,
ShowAdminSelecting = true,
};

Everything visible. Use this when you're debugging a specific run and want to see the full picture.

Quiet mode

var quiet = new LogicGridLoggerOptions
{
ShowAgentInput = false,
ShowAgentOutput = false,
ShowLlmMessages = false,
ShowToolCalls = false,
ShowRetries = false,
ShowTokenUsage = false,
ShowTimings = false,
// keep the high-signal lines on:
ShowAdminSelection = true,
ShowReflexionIterations = true,
ShowGraphTraversal = true,
ShowBudget = true,
};

Just the orchestration headlines, no per-step detail. Useful when you're piping logs into a system with limited bandwidth.

How options interact with sinks

LogicGridLoggerOptions sits inside LogicGridLogger and decides which events become entries. Sinks see only the entries that survive that filter — so toggling an option off is faster (and cheaper) than filtering at the sink layer.

If you need different verbosity per sink, attach two LogicGridLogger instances to the bus, each with its own options and sinks:

var bus = new AgentEventBus();

var consoleLogger = new LogicGridLogger(
new LogicGridLoggerOptions { ShowLlmMessages = false },
new ConsoleSink());
consoleLogger.AttachTo(bus);

var fileLogger = new LogicGridLogger(
new LogicGridLoggerOptions { ShowLlmMessages = true, ShowLlmRawResponse = true },
new JsonSink(File.AppendText("verbose.ndjson")));
fileLogger.AttachTo(bus);

var ctx = new AgentContext { EventBus = bus };