-
Notifications
You must be signed in to change notification settings - Fork 1
Replace console.log with structured logging #12
Copy link
Copy link
Open
Description
Description
There are 12+ console.log / console.error calls across production code paths in the facilitator packages. Some log sensitive data including transaction receipts and payer addresses.
Affected Files
typescript/packages/mechanisms/evm/src/exact/facilitator/eip3009.ts— logs transaction receipttypescript/packages/mechanisms/evm/src/exact/facilitator/permit2.ts— logs transaction receipttypescript/packages/mechanisms/evm/src/exact/v1/facilitator/scheme.ts— logs payer addresses, deployment errors, settlement errors
Impact
- Sensitive data (payer addresses, tx details) written to stdout
- No log levels — cannot filter debug vs error output
- No structured format — difficult to parse in log aggregation systems
- No correlation IDs — cannot trace requests across services
Fix
- Adopt a structured logging library (pino or winston)
- Remove all
console.log/console.errorcalls from production code - Add log levels (debug, info, warn, error) based on severity
- Ensure sensitive data (addresses, keys, full receipts) is redacted or excluded
- Add request correlation IDs for tracing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels