Compass command to tail and grep service logs

Table of Contents

This page is a capture in the next bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.

What

Add a compass command that, given a service name, tails the last N lines of that service's log and highlights/greps for errors (e.g. error, fatal, failed, exception, timed out) — combining the two operations we routinely do by hand. Logs live under build/output/<preset>/publish/log/<service>.<replica>.log (see the recipe below). Suggested shape: compass services logs <service> [--lines N] [--errors-only], defaulting to the active preset and replica 0, with a way to list available services and to follow (-f) live output. Should sit alongside the existing compass services status|start|stop sub-commands.

Why

Diagnosing a misbehaving service (e.g. the synthetic fx_spot.simulate NATS timeout) currently means manually resolving the preset-encoded log path, then running tail and grep separately. A first-class compass command would make this a one-liner, keep us inside the compass-first workflow instead of falling back to raw Unix tools, and remove the need to remember the build/output/<preset>/publish/log/ path pattern.

References

See also

Emacs 29.3 (Org mode 9.6.15)