From 984a2888aebb2b9be0bbc1235a0ba8c2fdcea4e6 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 25 Feb 2024 10:04:04 +0200 Subject: [PATCH] Refactor logging statements for better readability and debugging --- pr_agent/algo/ai_handlers/litellm_ai_handler.py | 2 +- pr_agent/tools/pr_description.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pr_agent/algo/ai_handlers/litellm_ai_handler.py b/pr_agent/algo/ai_handlers/litellm_ai_handler.py index b7929502..0604485f 100644 --- a/pr_agent/algo/ai_handlers/litellm_ai_handler.py +++ b/pr_agent/algo/ai_handlers/litellm_ai_handler.py @@ -115,7 +115,7 @@ class LiteLLMAIHandler(BaseAiHandler): if self.aws_bedrock_client: kwargs["aws_bedrock_client"] = self.aws_bedrock_client - get_logger().debug(f"Prompts", messages={"system": system, "user": user}) + get_logger().debug("Prompts", messages={"system": system, "user": user}) response = await acompletion(**kwargs) except (APIError, Timeout, TryAgain) as e: get_logger().error("Error during OpenAI inference: ", e) diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index 181692ca..783597a2 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -101,7 +101,7 @@ class PRDescription: pr_title, pr_body = self._prepare_pr_answer_with_markers() else: pr_title, pr_body, = self._prepare_pr_answer() - get_logger().debug(f"PR output", title=pr_title, body=pr_body) + get_logger().debug("PR output", title=pr_title, body=pr_body) # Add help text if gfm_markdown is supported if self.git_provider.is_supported("gfm_markdown") and get_settings().pr_description.enable_help_text: