[PR #424] Remove module-level logging.basicConfig from runtime modules #731

Open
opened 2026-03-13 21:06:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/424
Author: @AJaySi
Created: 3/12/2026
Status: 🔄 Open

Base: mainHead: codex/remove-logging.basicconfig-calls


📝 Commits (1)

  • d402eb1 Remove module-level basicConfig from runtime providers

📊 Changes

2 files changed (+1 additions, -8 deletions)

View changed files

📝 backend/api/linkedin_image_generation.py (+0 -1)
📝 backend/services/llm_providers/gemini_provider.py (+1 -7)

📄 Description

Motivation

  • Prevent modules from configuring global logging handlers at import time to avoid interfering with centralized logging bootstrap in logging_config.py.
  • Ensure modules rely on a consistent logger strategy (either get_service_logger(...) or logging.getLogger(__name__)) rather than reassigning or initializing handlers locally.
  • Reduce surprising side effects during application import and startup caused by logging.basicConfig(...) calls.

Description

  • Removed the module-level logging.basicConfig(...) call from backend/api/linkedin_image_generation.py and retained logger = logging.getLogger(__name__) for local module logging.
  • Removed redundant stdlib logging setup and the loguru import from backend/services/llm_providers/gemini_provider.py and preserved the service-specific logger via logger = get_service_logger("gemini_provider") for a single, consistent logging strategy.
  • Ensured no runtime module performs global handler configuration on import so logging is controlled centrally.

Testing

  • Ran python -m compileall backend/services/llm_providers/gemini_provider.py backend/api/linkedin_image_generation.py and compilation completed successfully.

Codex Task


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AJaySi/ALwrity/pull/424 **Author:** [@AJaySi](https://github.com/AJaySi) **Created:** 3/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/remove-logging.basicconfig-calls` --- ### 📝 Commits (1) - [`d402eb1`](https://github.com/AJaySi/ALwrity/commit/d402eb1445209ae87a3d9bf87a6e04ecdb07e98a) Remove module-level basicConfig from runtime providers ### 📊 Changes **2 files changed** (+1 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `backend/api/linkedin_image_generation.py` (+0 -1) 📝 `backend/services/llm_providers/gemini_provider.py` (+1 -7) </details> ### 📄 Description ### Motivation - Prevent modules from configuring global logging handlers at import time to avoid interfering with centralized logging bootstrap in `logging_config.py`. - Ensure modules rely on a consistent logger strategy (either `get_service_logger(...)` or `logging.getLogger(__name__)`) rather than reassigning or initializing handlers locally. - Reduce surprising side effects during application import and startup caused by `logging.basicConfig(...)` calls. ### Description - Removed the module-level `logging.basicConfig(...)` call from `backend/api/linkedin_image_generation.py` and retained `logger = logging.getLogger(__name__)` for local module logging. - Removed redundant stdlib logging setup and the `loguru` import from `backend/services/llm_providers/gemini_provider.py` and preserved the service-specific logger via `logger = get_service_logger("gemini_provider")` for a single, consistent logging strategy. - Ensured no runtime module performs global handler configuration on import so logging is controlled centrally. ### Testing - Ran `python -m compileall backend/services/llm_providers/gemini_provider.py backend/api/linkedin_image_generation.py` and compilation completed successfully. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69b14686879c832888342c849067c4e4) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#731
No description provided.