Agent Wranglers

OPS-8Recommended

Use log levels with fixed meanings

Use a small set of levels, each with one meaning, and run production at info level.

How to do it

Use error for failures that need a person, warn for handled problems, info for business events and debug for detail that stays off in production. Write the meanings down. Never log the same failure at several levels. Errors at error level then feed the tracking in Log, track errors and alert.

How to check

In one day of production logs, every error line matches an error the team tracks. No debug lines appear.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/operations/logs/log-levels">Agent Wranglers operations and observability playbook</a>. In code you write, add a comment next to it with the same link.