Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Implement Logger for Error Handling in Backend #72

Closed
3 tasks done
samar12-rad opened this issue Oct 4, 2024 · 4 comments
Closed
3 tasks done

Feat: Implement Logger for Error Handling in Backend #72

samar12-rad opened this issue Oct 4, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request gssoc-ext gssoc-extd program hacktoberfest accepted hacktoberfest-accepted repo level3 for 45 points

Comments

@samar12-rad
Copy link
Contributor

Describe the feature

Description: This is from the pr #65 @RamakrushnaBiswal .
Currently, the backend of the café website is handling errors using console.log and console.error, which is not ideal for production environments. To follow industry standards and improve error handling, we should incorporate a logging library like Winston or Morgan.

Proposed Solution:

Incorporate a Logger Library:
Implement a logging library such as Winston or Morgan in the backend.
Configure the logger to handle different levels of logs (e.g., info, warn, error), and log errors more effectively.

Replace console.log and console.error:
Identify and replace all instances of console.log and console.error with the appropriate logger methods (e.g., logger.info(), logger.error()).

Enhance Error Tracking:
Ensure that logs capture relevant metadata (like timestamps, request information, etc.) for better debugging and monitoring.
Optionally, configure logs to be saved in files or external services (like Loggly, Sentry, etc.) for better error monitoring.

Benefits:
Improves error tracking and handling in the backend.
Provides detailed logs for debugging and monitoring, which is essential for production.
Helps in maintaining logs over time, which can assist in identifying issues more easily.

@RamakrushnaBiswal , pls assign me this

Add ScreenShots

image

Record

  • I agree to follow this project's Code of Conduct
  • I'm a gssoc-24-extd contributor
  • I want to work on this issue
@samar12-rad samar12-rad added the enhancement New feature or request label Oct 4, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project.
for more information join our discord https://discord.gg/Jh3bWQ7FRN

@RamakrushnaBiswal
Copy link
Owner

assigned @samar12-rad

@RamakrushnaBiswal
Copy link
Owner

solved via #89

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Hello @samar12-rad! Your issue #72 has been closed. Thank you for your contribution!🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gssoc-ext gssoc-extd program hacktoberfest accepted hacktoberfest-accepted repo level3 for 45 points
Projects
None yet
Development

No branches or pull requests

2 participants