Integrate structured logging using Winston to improve observability, debugging, and production readiness of the API.
The current application relies on basic or minimal logging. This issue aims to introduce a centralized logging system that produces structured, timestamped logs suitable for real-world backend environments.
What Needs to Be Done
Install and configure winston.
Create a dedicated logger configuration file (e.g., utils/logger.js).
Replace all console.log and console.error statements with appropriate logger methods (info, warn, error).
Log important events such as:
User registration attempts
Login success and failure
Status toggle operations
Account deletion
Server startup
Application errors
Ensure logs include timestamps and meaningful contextual data (e.g., endpoint, status code, user ID where applicable).
Acceptance Criteria
Winston is properly configured and centralized.
No remaining console statements in production code.
Logs are structured and consistent.
Existing functionality remains unaffected.
Integrate structured logging using Winston to improve observability, debugging, and production readiness of the API.
The current application relies on basic or minimal logging. This issue aims to introduce a centralized logging system that produces structured, timestamped logs suitable for real-world backend environments.
What Needs to Be Done
Install and configure winston.
Create a dedicated logger configuration file (e.g., utils/logger.js).
Replace all console.log and console.error statements with appropriate logger methods (info, warn, error).
Log important events such as:
User registration attempts
Login success and failure
Status toggle operations
Account deletion
Server startup
Application errors
Ensure logs include timestamps and meaningful contextual data (e.g., endpoint, status code, user ID where applicable).
Acceptance Criteria
Winston is properly configured and centralized.
No remaining console statements in production code.
Logs are structured and consistent.
Existing functionality remains unaffected.