Skip to content

Feature/logging rework - #44

Merged
fxai merged 9 commits into
mainfrom
feature/logging-rework
Oct 29, 2026
Merged

fxai merged 9 commits into
mainfrom
feature/logging-rework

Conversation

@fxai

@fxai fxai commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Logging rework

Consistent stdout logging with the service layer as the place for business events.

Changes

  • Levels: expected events are no longer logged as ERROR. Failed logins, 403s and invalid tokens are WARNING. Expired tokens and successful logins are INFO. Unexpected errors use exception(), which includes the traceback.
  • Audit trail: every write logs one INFO line after the commit, with the acting user, the action and the object (User alice@x deleted activity 'X' (<id>) in assessment <id>). This covers users, assessments, ACLs, activities, groups, assets, tags, files, imports and exports, reports, and seeding (who started it).
  • Rejected actions are logged as WARNING: invalid uploads or import files, a blue team user deleting a red team file, attempts to change the main admin.
  • Seeding: f-strings replaced by % arguments. A broken single file is a WARNING, a failed import is an ERROR with traceback.
  • Frontend: removed the "Logs – Coming Soon" card from the admin page. Logs are not stored in the database.
  • Docs: new page Developer Guide → Backend → Logging with the rules, "What is logged" in the admin configuration page, and the roadmap item marked as done.

Notes

  • No API or database changes. parse_and_ingest_mitre_data_service has a new optional user parameter.
  • Uvicorn's access log is unchanged and keeps its own format.
  • All 281 backend tests pass. The docs build passes with --strict.

@fxai
fxai merged commit 3fb0048 into main Oct 29, 2026
6 checks passed
@fxai
fxai deleted the feature/logging-rework branch October 29, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant