Skip to content

feat(logging): add structured Winston logging, global request middlew…#384

Merged
BigBen-7 merged 3 commits into
Lead-Studios:dev-v1from
Cedarich:feature/observability-logging-winston
Sep 30, 2025
Merged

feat(logging): add structured Winston logging, global request middlew…#384
BigBen-7 merged 3 commits into
Lead-Studios:dev-v1from
Cedarich:feature/observability-logging-winston

Conversation

@Cedarich
Copy link
Copy Markdown
Contributor

🚀 PR: Add structured logging and observability (Winston + external streaming)

📄 Description

  • 📝 Introduces a Winston-based LoggerService with JSON output and optional external streaming (Loki/Datadog/generic HTTP).
  • 🌐 Adds a global RequestLoggerMiddleware capturing method, URL, status code, and duration with log levels (info/warn/error).
  • ⚡ Wires the custom logger in bootstrap to log startup events.
  • ⚙️ Extends configuration and env validation to include logging settings.
  • 📦 Adds axios and winston dependencies, updates .env.example with logging variables.

✅ Acceptance Criteria

  • 🛡️ Errors and requests are logged consistently with structure and levels.
  • 📊 Logs can be streamed to an external dashboard via LOG_EXTERNAL_* variables.

🧪 Verification Steps

  1. Set LOG_LEVEL and (optionally) enable LOG_EXTERNAL_* variables.
  2. Run:
    npm install
    npm run start:dev

@BigBen-7
Copy link
Copy Markdown
Collaborator

please @Cedarich resolve conflicts

@Cedarich
Copy link
Copy Markdown
Contributor Author

Conflicts resolved.
Thanks

@BigBen-7 BigBen-7 merged commit 8a233c9 into Lead-Studios:dev-v1 Sep 30, 2025
1 of 2 checks passed
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.

3 participants