[refactor] replaced info
logging with debug
for improved logging granularity and removed redundant log statements in backend services
This commit is contained in:
@@ -206,7 +206,7 @@ class NewsFetcher:
|
||||
A dictionary containing the article title and summaries in German and English,
|
||||
or None if summarization failed
|
||||
"""
|
||||
logger.info("[AI] Fetching article content from: " + url)
|
||||
logger.debug("[AI] Fetching article content from: " + url)
|
||||
|
||||
article_content = await NewsFetcher.fetch_article_content(client, url)
|
||||
|
||||
@@ -228,6 +228,9 @@ class NewsFetcher:
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -236,9 +239,6 @@ class NewsFetcher:
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -253,7 +253,7 @@ class NewsFetcher:
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("[AI] Running summary generation...")
|
||||
logger.debug("[AI] Running summary generation...")
|
||||
|
||||
try:
|
||||
response = await client.post(
|
||||
@@ -266,7 +266,7 @@ class NewsFetcher:
|
||||
result = response.json()
|
||||
llm_response = result["response"]
|
||||
|
||||
logger.info("[AI] " + llm_response)
|
||||
logger.debug("[AI] " + llm_response)
|
||||
|
||||
if isinstance(llm_response, str):
|
||||
summary_data = json.loads(llm_response)
|
||||
@@ -432,8 +432,6 @@ class NewsFetcher:
|
||||
summary=rss_summary
|
||||
)
|
||||
|
||||
logger.info(summary)
|
||||
|
||||
if not summary:
|
||||
logger.warning(
|
||||
f"❌ Failed to get summary for article {i}: {article_url}")
|
||||
|
Reference in New Issue
Block a user