"Whether youβre flying solo or under the protection of The Logfather, this oneβs got your back."
This instruction file provides a clean, reusable summary of application logging best practices β designed for use with Copilotβs editFiles and readFiles capabilities.
Originally crafted as a companion to The Logfather, it provides opinionated but practical guidance for improving structured logging, log level usage, runtime configuration, and secure output β all without requiring infrastructure changes or external dependencies.
- The Logfather agent β for automated agent-driven logging audits and fixes
- Manual use β by developers who want to up their observability game
- Copilot agent tasks β like logging linting, log upgrades, or secure log refactors
- β JSON-structured logging best practices
- β Log level definitions and guidance
- β Context enrichment (trace IDs, modules, etc)
- β Runtime control of log levels
- β Secure log handling (no PII, no auth leaks)
- β Language-specific examples (Java, Python, JS)
You can:
- Drop this into any
.instructions.mdloader or reference it via#logging-best-practices.instructions.md - Bundle it with a agent like The Logfather
- Invoke it directly inside a Copilot Agent or compatible AI tool
- Upload as guide for GitHub Coding Agent
When loaded in context, Copilot should:
- Recommend structured JSON log formats
- Insert proper log levels based on context
- Suggest central logger use (but not enforce setup)
- Avoid business logic changes
- Respect scoped paths or modules
Please review this file using `#./instructions/logging-best-practices.instructions.md` and insert structured logs with appropriate levels.π© Want it automatic? Pair it with
The Logfatherand let the capo handle it.
Generated with the help of ChatGPT as directed by Ashley Childress