Skip to content

Research reliable Pino logger flush on shutdown #13

@UniquePixels

Description

@UniquePixels

Context

Audit ID: SEC-7

Pino worker-thread transports have no reliable flush callback. The current 100ms delay in logger.ts may be insufficient under load, potentially losing final log lines during shutdown.

Approach

  • Investigate Pino internals for flush support with worker-thread transports
  • Consider increasing delay to 250-500ms as a simple fix
  • Evaluate custom transport with explicit flush if log loss is unacceptable
  • Document findings regardless of outcome

Files

  • src/core/lib/logger/logger.ts (L117-122)

Metadata

Metadata

Assignees

No one assigned

    Labels

    researchNeeds investigation before implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions