logger-components · git:20261004.4bb7222 · 2026-10-04 · sha256 9d7d62da76d47403

logger-components git:20261004.4bb7222A

Immutable. This exact content never changes and is served at /api/v1/blob/9d7d62da76d47403.

---
description: Component-scoped logger levels and hierarchy
globs:
  - "internal/logger/**/*.go"
  - "internal/config/**/*logger*.go"
  - "internal/session/**/*.go"
  - "internal/agent/**/*.go"
  - "external/gateway/**/*.go"
  - "external/scheduler/**/*.go"
alwaysApply: false
---
# Logger components

- Tag a subsystem logger once with `logger.Component`; `WithAttrs` inherits the component.
- An inline record attribute cannot affect `Enabled`.
- Component names are dotted paths, and overrides resolve by the longest configured prefix.
- Open the inner handler at the lowest requested level; `componentHandler` performs per-component filtering.
- Every new configurable subsystem gets a named component constant and hierarchy tests.