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
The current implementation uses print statements under a debug flag for outputting debug information. While this approach works, it is recommended to use
logging.debuginstead. 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:
Action Items:
logging.debugin the relevant sections of the code.I created this issue for @ItsSimko from #45 (comment).
Tips and commands
Interacting with Sourcery
@sourcery-ai planon this issue.@sourcery-ai developtogenerate a PR that addresses this issue.
Getting Help