Runbook: Logging Failing
Trigger
- No new entries in
logs/app.log. - App crashes on startup with logging-related error.
- Wrong log path or no write permission.
Fast triage
- Check
.env:LOG_DIR,LOG_FILE_NAME,LOG_LEVEL. - Check directory and file permissions for
logs/. - Start app and send test request:
make run, then call/health.
Most common causes
- Invalid/unexpected
LOG_LEVELvalue. - Non-writable log directory.
- App started from a different folder; relative paths break.
- Logging code changed but startup in
app/main.pydoes not match.
Recovery steps
- Reset to known-good defaults in
.env:LOG_DIR=logs,LOG_FILE_NAME=app.log,LOG_LEVEL=INFO. - Restart app: stop server and run
make runagain. - Verify request log line appears after calling
/health. - If still failing, inspect
app/core/logging.pypath/handler setup.
Exit criteria
- New requests write lines to
logs/app.log. - App startup is stable.
make teststill passes.
Follow-up
- If this changes observability policy, add or update an ADR.
- If it is a new failure pattern, update this runbook.
Page history
| Date | Change | Author |
|---|---|---|
| Added Page history section (repository baseline). | Ivan Boyarkin |