mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-26 09:25:55 +03:00
[PR #409] [MERGED] Centralize and modernize backend logging with Loguru and configurable sinks #712
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#712
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/409
Author: @AJaySi
Created: 3/11/2026
Status: ✅ Merged
Merged: 3/12/2026
Merged by: @AJaySi
Base:
main← Head:codex/review-logging_config.py-for-improvements📝 Commits (1)
7619604Harden logging config with safer overrides and optional JSON/file sinks📊 Changes
6 files changed (+287 additions, -124 deletions)
View changed files
📝
backend/api/linkedin_image_generation.py(+1 -3)📝
backend/app.py(+2 -2)📝
backend/logging_config.py(+280 -110)📝
backend/main.py(+2 -2)📝
backend/services/llm_providers/gemini_provider.py(+0 -5)📝
backend/start_alwrity_backend.py(+2 -2)📄 Description
Motivation
logurufor clearer, consistent output and easier diagnostics.Description
backend/logging_config.pyto implementconfigure_logging(...)which configureslogurusinks, stdlib interception viaInterceptHandler, per-logger overrides fromALWRITY_LOG_LEVEL_OVERRIDES, optional JSON formatting, file rotation/retention, and uncaught exception hooks.bind_logger_context(...)and a backward-compatiblesetup_clean_logging()wrapper to preserve existing import sites.backend/app.py,backend/main.py, andbackend/start_alwrity_backend.pyto callconfigure_logging(...)with abootstrap_sourceinstead of the previoussetup_clean_logging().backend/api/linkedin_image_generation.pynow usesloguru'slogger, andbackend/services/llm_providers/gemini_provider.pyuses a service-specificget_service_loggerand improved.envloading logic while removing ad-hocbasicConfigusage.Testing
Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.