Skip to content

Add structured 'admin_action' log channel separate from request logs (v5 patch) #561

Description

@greatest0fallt1me

Description

This is a backend issue for the GrantFox campaign. Emit admin actions to a separate structured log channel so they can be alerted on without noise from request logs.

Requirements and Context

  • Pino child logger for admin actions
  • Distinct stream/sink configuration
  • Every admin endpoint emits via this channel
  • Adhere to repo's lint and code style
  • Must be secure, tested, and documented

Suggested Execution

  1. Fork the repo and create a branch
    git checkout -b feature/admin-log-channel
  2. Implement changes
    • src/middleware/adminLog.ts (new)
    • src/routes/admin/**
  3. Test and commit

Example commit message

feat: structured admin_action log channel

Acceptance Criteria

  • Child logger created
  • Admin endpoints emit
  • Tests added
  • Docs updated

Guidelines

  • Minimum 90% test coverage on changed lines
  • Structured logging with correlation IDs
  • Clear documentation and inline comments
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    GRANTFOX OSSGrantFox open-source campaign taskOFFICIAL CAMPAIGNOfficial GrantFox campaign issuebackendBackend service workdocumentationDocumentationsecuritySecurity hardening

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions