---
type: story
title: Colored server terminal log output
---

# Colored server terminal log output

## Problem

All server log lines printed to stderr via `slog!`, `slog_warn!`, and `slog_error!` appear in the same default terminal color. When scanning server output it's hard to spot warnings and errors at a glance — especially failed merge attempts.

## Solution

Add ANSI color codes to `push_entry()` in `server/src/log_buffer.rs` so that log lines printed to stderr are color-coded by severity:

- **INFO** — default (no color)
- **WARN** — yellow/orange (`\x1b[33m`)
- **ERROR** — red (`\x1b[31m`)

The color wrapping should only apply to the `eprintln!` output (line 78). The `LogEntry` stored in the ring buffer should remain uncolored so that `get_server_logs` MCP tool returns clean text.

## Files to change

- `server/src/log_buffer.rs` — `push_entry()` method (line ~78): replace `eprintln!("{line}")` with a match on `entry.level` that wraps the line in ANSI escape codes for WARN and ERROR.

## Acceptance criteria

- WARN logs appear in yellow/orange in the terminal
- ERROR logs appear in red in the terminal
- INFO logs remain default color
- Ring buffer entries remain free of ANSI escape codes
- Existing tests pass
