Skip to content

docs: add logging quality audit#1

Closed
Microck wants to merge 1 commit into
mainfrom
logging-audit
Closed

docs: add logging quality audit#1
Microck wants to merge 1 commit into
mainfrom
logging-audit

Conversation

@Microck
Copy link
Copy Markdown
Owner

@Microck Microck commented Mar 5, 2026

Add comprehensive logging audit report identifying gaps and recommendations.

What this PR does:

  • Documents current logging infrastructure using the tracing crate
  • Catalogs all existing log statements across main.rs, scan.rs, and verdict.rs
  • Identifies 7+ critical gaps in observability across scan lifecycle, external service calls, and detector execution
  • Provides prioritized recommendations with concrete code examples
  • Establishes logging conventions for future development (info/warn/debug/error usage, structured fields, trace correlation)

Key gaps identified:

  1. HIGH: No scan lifecycle logging (init, progress, completion, verdict)
  2. HIGH: No external service call logging (MalwareBazaar, AI API)
  3. MEDIUM: No detector execution summary or YARA scan logging
  4. MEDIUM: No profile building or mod metadata extraction logging

Current state:

  • Only 11 log statements across 25+ source files
  • No logs use scan_id/upload_id for trace correlation
  • No performance metrics (timing, duration)
  • No debug-level logs for troubleshooting

Recommendations include:

  • Scan lifecycle instrumentation with structured fields
  • External service request/response logging with timing
  • Detector execution summaries by category and severity
  • Dedicated logging helpers module for consistency

Nightshift-Task: logging-audit
Nightshift-Ref: https://github.com/marcus/nightshift

Add comprehensive logging audit report identifying gaps and recommendations.
- Documents current logging infrastructure and existing log statements
- Identifies critical gaps in scan lifecycle, external service calls, and detector execution
- Provides prioritized recommendations with code examples
- Establishes logging convention for future development

Nightshift-Task: logging-audit
Nightshift-Ref: https://github.com/marcus/nightshift
@Microck Microck closed this Mar 5, 2026
@Microck Microck deleted the logging-audit branch March 5, 2026 21:40
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