-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
Add a lightweight, environment-aware logger and replaces direct client-side console.* calls with the logger to reduce noisy client logs in production while keeping error visibility during development also remove a stray debug log from the development dynamic page.
- Avoids noisy console output in production client browsers.
- Provides consistent, searchable log prefixes and event names for future diagnostics or easy integration with remote logging/monitoring.
- Low-risk: behavior unchanged for server-side logs (left untouched) and error visibility preserved in dev.
Logging behavior:
- In development (NODE_ENV !== 'production') logger.debug/info will print prefixed messages.
- In production logger.debug/info are silenced; warn/error still print to console.
Future aspect:
- Integrate a server- or client-side error reporter (Sentry/Datadog). I can add an adaptor that forwards logger.error to Sentry when a DSN env var is present.
label [if accepted] : hacktoberfest
for review: @fenilmodi00 or @HoomanDgtl
Metadata
Metadata
Assignees
Labels
No labels