Standard console.log() statements are hard to search and filter when debugging on cloud platforms . We need to upgrade to a professional, structured logging library.
What needs to be done:
-
Install a logging library like pino or winston.
-
Create a logger.js utility file to configure the logger (e.g., formatting outputs as JSON in production, and pretty-printing in development).
-
Replace all existing console.log and console.error calls across the project with logger.info() and logger.error().
-
Ensure no sensitive user data (like full wallet keys if deemed private) is accidentally logged.
Branching Instructions:
Please branch off main and push your changes to this feature branch:
git checkout -b feat/structured-logging
Standard console.log() statements are hard to search and filter when debugging on cloud platforms . We need to upgrade to a professional, structured logging library.
What needs to be done:
Install a logging library like pino or winston.
Create a logger.js utility file to configure the logger (e.g., formatting outputs as JSON in production, and pretty-printing in development).
Replace all existing console.log and console.error calls across the project with logger.info() and logger.error().
Ensure no sensitive user data (like full wallet keys if deemed private) is accidentally logged.
Branching Instructions:
Please branch off main and push your changes to this feature branch:
git checkout -b feat/structured-logging