Skip to content

enhance: Replace print() with logging #74

Description

@anidixit64

title: "Replace print Commands with Logging"

Acceptance Criteria

A checklist of conditions that must be met for this feature to be considered complete.

  • At the top of parser.py, add import logging.
  • Create a module-level logger: log = logging.getLogger(name).
  • Search for all instances of print(f"Warning: ...") in the file.
  • Replace each one with an appropriate log.warning() or log.error() call, using format strings for variables.
    • Example in parse_epub: log.warning("Could not parse chapter %s: %s", href, e)
    • Example in _extract_chapter_titles: log.warning("Could not extract chapter titles...: %s", e)

Definition of Done

  • Feature implemented as per Acceptance Criteria
  • All new code is covered by pytest tests
  • Ensure >90% coverage on the changed or new code
  • Documentation (docstrings and Sphinx docs) is updated
  • The pre-commit hooks pass on all changed files

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

choreBackend development tasksenhanceImprove an existing feature

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions