Skip to content

Replace print statements with logging.debug for debug output #46

Description

@sourcery-ai

The current implementation uses print statements under a debug flag for outputting debug information. While this approach works, it is recommended to use logging.debug instead. This change would align with the existing logging setup in the file and provide better control over debug output, especially in production environments.

Suggested Implementation:

Replace the print statements with the following logging statements:

if USE_DEBUG:
    logging.debug(f"Whisper Task: {whisper_task}")
    logging.debug(f"Whisper Lang: {whisper_lang}")
    logging.debug(f"Initial Prompt: {initial_prompt}")

if USE_DEBUG:
    logging.debug("Transcription finished. Results returned to request address.")

Action Items:

  • Replace existing print statements with logging.debug in the relevant sections of the code.
  • Ensure that the logging setup is correctly configured to handle debug level logs.
  • Test the changes to confirm that debug information is logged as expected.

I created this issue for @ItsSimko from #45 (comment).

Tips and commands

Interacting with Sourcery

  • Generate a plan of action: Comment @sourcery-ai plan on this issue.
  • Generate a pull request for this issue: Comment @sourcery-ai develop to
    generate a PR that addresses this issue.

Getting Help

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