Skip to content

feat: add structured Pino logging to starter node template#1130

Closed
zeroknowledge0x wants to merge 1 commit into
sublime247:mainfrom
zeroknowledge0x:feat/issue-997-pino-logging
Closed

feat: add structured Pino logging to starter node template#1130
zeroknowledge0x wants to merge 1 commit into
sublime247:mainfrom
zeroknowledge0x:feat/issue-997-pino-logging

Conversation

@zeroknowledge0x
Copy link
Copy Markdown

Closes #997

Summary

Replaces all console.log/console.error calls with structured Pino logger for consistent, JSON-formatted log output in the bridge-starter-node template.

Changes

  • Add pino and pino-pretty as dependencies
  • Create src/config/logger.ts — centralized logger with dev (colorized) and production (JSON) modes
  • Add src/middleware/requestLogger.ts — logs method, URL, status code, and duration for every request
  • Update webhook.ts — structured logging with event type context
  • Update bridge.ts — structured error logging with API response context
  • Update app.ts — wire up request logger middleware

Testing

  • Logger outputs JSON in production mode, colorized in dev
  • Request logger captures all HTTP requests with timing
  • All console.log/console.error replaced with typed pino methods (info, warn, error)

Addresses sublime247#997. Replaces all console.log/console.error calls with
structured Pino logger for consistent, JSON-formatted log output.

Changes:
- Add pino and pino-pretty dependencies
- Create logger config module with dev/production modes
- Add request logging middleware (method, url, status, duration)
- Update webhook routes with structured log context
- Update bridge service with structured error logging
- Update app.ts with startup logging and request middleware
@sublime247
Copy link
Copy Markdown
Owner

@unsiqasik was this assigned to you ??

@gitguardian
Copy link
Copy Markdown

gitguardian Bot commented May 30, 2026

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- - JSON Web Token 45e3b17 src/utils/tests/scrub.test.ts View secret
- - Bearer Token 45e3b17 src/utils/tests/scrub.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@sublime247 sublime247 closed this May 30, 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.

[GOOD FIRST ISSUE] Add Structured Pino Logging to Starter Node template

3 participants