feat: add structured Pino logging to starter node template#1130
feat: add structured Pino logging to starter node template#1130zeroknowledge0x wants to merge 1 commit into
Conversation
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
|
@unsiqasik was this assigned to you ?? |
|
| 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
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- 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
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 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.
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
pinoandpino-prettyas dependenciessrc/config/logger.ts— centralized logger with dev (colorized) and production (JSON) modessrc/middleware/requestLogger.ts— logs method, URL, status code, and duration for every requestwebhook.ts— structured logging with event type contextbridge.ts— structured error logging with API response contextapp.ts— wire up request logger middlewareTesting