Skip to content

Backend uses print statements instead of structured logging #33

Description

@A69SHUBHAM

Problem

The backend currently relies on print statements for debugging and tracking execution flow.

This leads to:

  • Lack of structured and consistent logs
  • Difficulty in debugging issues in production
  • No separation between debug and production logging
  • Limited visibility into API requests, responses, and failures

Expected Behavior

  • Use Python's logging module instead of print statements
  • Support different log levels (INFO, WARNING, ERROR)
  • Log important events such as API requests, responses, and failures
  • Separate debug and production logging configurations
  • Ensure logs are structured and readable

Proposed Solution

  • Replace print statements with Python logging module
  • Configure logging with appropriate format and levels
  • Add logs for:
    • Incoming API requests
    • External API calls and responses
    • Error and exception handling
  • Add configuration for debug vs production environments

Impact

  • Improves debugging and observability
  • Makes the application more production-ready
  • Enhances maintainability and monitoring

Additional Context

I would like to work on this issue and submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions