mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 17:05:56 +03:00
[PR #422] [MERGED] Unify backend logging bootstrap with a single configure_logging entrypoint #727
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#727
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/422
Author: @AJaySi
Created: 3/12/2026
Status: ✅ Merged
Merged: 3/12/2026
Merged by: @AJaySi
Base:
main← Head:codex/add-configure_logging-entrypoint📝 Commits (1)
51313f6Unify backend logging configuration entrypoint📊 Changes
4 files changed (+64 additions, -16 deletions)
View changed files
📝
backend/app.py(+2 -2)📝
backend/logging_config.py(+58 -10)📝
backend/main.py(+2 -2)📝
backend/start_alwrity_backend.py(+2 -2)📄 Description
Motivation
logginguse a single configurable entrypoint for normal vs verbose runs.Description
configure_logging(mode, verbose, app_name)inbackend/logging_config.pywith a_LOGGING_CONFIGUREDguard to remove existing Loguru handlers once and avoid duplicate setup.LoguruInterceptHandlerto forward stdlibloggingrecords (includingexc_info) into Loguru and setlogging.captureWarnings(True)sowarningsalso flow into Loguru.app_nameinto output formats, and set root logger handlers/level plus cleared named logger handlers and enabled propagation sologging.getLogger(...)across services goes through the same pipeline.setup_clean_logging()as a backward-compatible wrapper and updated startup files to call the new entrypoint:backend/app.py,backend/main.py, andbackend/start_alwrity_backend.py.Testing
python -m py_compile backend/logging_config.py backend/app.py backend/main.py backend/start_alwrity_backend.pyand the compilation succeeded.configure_logging(...)instead of the legacysetup_clean_logging()wrapper.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.