Skip to content

spec: add system-logger-pino change proposal#184

Open
avoidwork wants to merge 2 commits into
mainfrom
docs/add-system-logger-pino
Open

spec: add system-logger-pino change proposal#184
avoidwork wants to merge 2 commits into
mainfrom
docs/add-system-logger-pino

Conversation

@avoidwork

Copy link
Copy Markdown
Owner

Description

Add a structured system logger using pino to replace all console.log, console.warn, and console.error calls across the codebase. The logger writes structured JSON to OS-aware log files: `madz.log` (info+) and `madz_error.log` (error only). Supports Alpine/Docker, standard Linux, macOS, and Windows.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature which would cause existing functionality to not work as expected)
  • Documentation write
  • Refactor (no functional changes)
  • Performance improvement
  • CI / build / tooling

Testing

The change artifacts define 18 implementation tasks including unit tests for the logger module. Tests will cover:

  • OS directory detection (Alpine, Linux, macOS, Windows)
  • Dual-file output (madz.log and madz_error.log)
  • Silent mode under `NODE_ENV === "test"`
  • Graceful fallback on unwritable log directories
  • Replacement of console.* calls in 5 files (index.js, shutdown.js, cron.js, autoSchedule.js, gc.js)

Coverage

  • 100% line coverage maintained (per tasks checklist item 5.2)

Checklist

  • `npm run lint` passes (verified during implementation)
  • Tests pass with 100% line coverage (pending implementation)
  • No forbidden patterns used
  • Conventional Commit style applied

@avoidwork avoidwork self-assigned this Jun 12, 2026
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