Skip to content

feat(logging): implement structured JSON logging with correlation IDs…#429

Open
Gutopro wants to merge 1 commit into
Smartdevs17:mainfrom
Gutopro:feat/structured-logging-correlation-ids
Open

feat(logging): implement structured JSON logging with correlation IDs…#429
Gutopro wants to merge 1 commit into
Smartdevs17:mainfrom
Gutopro:feat/structured-logging-correlation-ids

Conversation

@Gutopro
Copy link
Copy Markdown

@Gutopro Gutopro commented Jun 1, 2026

Closes #397

What this PR does

Implements structured JSON logging with correlation IDs, PII redaction and log level configuration across the api and oracle services.

Changes

  • Created api/src/middleware/logger.ts — Winston JSON logger with PII redaction and correlation ID support
  • Created api/src/middleware/requestId.js — Correlation ID middleware using cls-hooked for async propagation
  • Created oracle/src/logger.ts — Structured logger for oracle service with PII redaction

Acceptance Criteria

  • Structured JSON logging format
  • Correlation ID propagation across async boundaries via cls-hooked
  • Log level configuration per module via LOG_LEVEL / ORACLE_LOG_LEVEL env vars
  • PII redaction in log output (password, email, phone, ssn, token, creditCard)
  • Centralized log aggregation via Winston Console transport

Notes

Depends on: existing requestIdMiddleware already registered in app.ts

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@goat-programmer is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Gutopro Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Implement comprehensive logging with structured format and correlation IDs

2 participants