Logging
RadarOS includes a built-inLogger with colored terminal output and structured agent run formatting. Control verbosity via logLevel in AgentConfig.
Logger Class
TheLogger is used internally by agents. You can also instantiate it directly:
LogLevel
| Level | Order | Use Case |
|---|---|---|
debug | 0 | Tool call details, arguments, results |
info | 1 | Agent start/end, token usage, duration |
warn | 2 | Warnings |
error | 3 | Errors |
silent | 4 | No logging (default for agents) |
Setting logLevel in AgentConfig
Control agent logging with thelogLevel property:
"debug"— Logs tool calls, arguments, and results (verbose)."info"— Logs agent start, output, token usage, and duration."silent"— No logs (default).
What Gets Logged
Agent start
Agent start
When a run begins: agent name and input preview.
Tool calls
Tool calls
At
debug level: tool name and arguments.Tool results
Tool results
At
debug level: tool name and result preview (truncated).Token usage
Token usage
At
info level: prompt tokens, completion tokens, total tokens.Duration
Duration
At
info level: wall-clock duration (ms or seconds).Agent end
Agent end
When a run completes: output preview and summary.
LoggerConfig
| Property | Type | Default | Description |
|---|---|---|---|
level | LogLevel | "info" | Minimum level to log. |
color | boolean | process.stdout.isTTY !== false | Enable colored output. Auto-disabled when not a TTY. |
prefix | string | "radaros" | Prefix shown in log lines. Agents use their name as prefix. |
Colored Terminal Output
The logger uses ANSI escape codes for colored output:- Cyan — Agent name, box borders
- Magenta — Tool names
- Green — Token counts, success indicators
- Yellow — Duration, string values
- Gray — Timestamps, metadata
- Red — Errors
┌, │, └, ─) create a structured layout for agent runs.
Example Output
WithlogLevel: "info":
logLevel: "debug", additional lines appear for each tool call: