feat: Centralize logging configuration across backend modules#45
Open
alisoliman wants to merge 7 commits intomainfrom
Open
feat: Centralize logging configuration across backend modules#45alisoliman wants to merge 7 commits intomainfrom
alisoliman wants to merge 7 commits intomainfrom
Conversation
- Add LOG_LEVEL setting to config.py for environment-based log level control - Create logging_config.py with setup_logging() for single-point configuration - Call setup_logging() early in main.py before other imports - Remove scattered basicConfig() calls from 8 modules - Replace print() with logger.error() in gallery.py error handler - Remove redundant function-level logging imports This ensures consistent log format and predictable behavior regardless of module import order. Log level can be controlled via LOG_LEVEL env var.
- Replace color system with pure B/W + single red accent (#FF0000) - Swap fonts to Bebas Neue (display) + Source Sans 3 (body) - Set all border-radius to 0px for sharp, architectural edges - Apply uppercase + wide letter-spacing to all headings/labels - Increase whitespace and spacing throughout (8rem+ gaps) - Oversized typography with clamp() and font-weight 900 - Dramatic 404 page with massive type - Bold minimal login page - Clean card overlays with no rounded corners - Tighter grid gaps for gallery views - Updated sidebar with bold section labels and border accents - Dark mode: deep black (#0A0A0A) with white text Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Red Thread — a signature 2px red accent line (#E40010) that weaves through the entire interface as the single memorable element: - Slides under active page headers and sidebar brand - Draws across hover states on gallery cards (bottom edge) - Climbs vertically on stat cards on hover - Appears as a divider on login and empty states Atmosphere & texture: - Film grain overlay via SVG noise filter (body::after) - Red text selection color across the entire app - Red focus rings for keyboard navigation - Refined color palette with warmer neutrals Motion & reveals: - Custom @Keyframes: reveal-up, fade-in, line-draw - Stagger delay classes (.stagger-1 through .stagger-6) - Dramatic 404 page with layered animations - Login page with sequenced entrance (title → red line → subtitle → form) - Refined page transitions with cubic-bezier(0.22, 1, 0.36, 1) Typography refinements: - Tighter heading line-height (0.9) for dramatic stacking - Wider letter-spacing on labels (0.2em+) - 404 scaled up to clamp(10rem, 30vw, 24rem) - Stat numbers at text-5xl with -0.05em tracking Editorial details: - Settings tabs restyled as underlined editorial navigation - Theme toggle icon turns red on hover - Gallery card hover: border goes foreground + red bottom line - Login card border thickens on hover (2px → foreground) - prefers-reduced-motion fully respected Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…dule Add IMAGEGEN_15_DEPLOYMENT and IMAGEGEN_1_MINI_DEPLOYMENT params to containerApp.bicep and pass them as env vars. Remove unnecessary dependsOn entries that Bicep infers from output references. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace RowBasedMasonryGrid with Aceternity UI's LayoutGrid component for the image gallery. Cards animate on click with Framer Motion layout transitions. Existing interactions (delete, move, detail view) preserved. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
logging_config.py)LOG_LEVELenvironment variable for runtime log level controlbasicConfig()calls that caused unpredictable behaviorProblem
The backend had
logging.basicConfig()scattered across 8 different modules. SincebasicConfig()only takes effect on the first call, the actual logging configuration depended on module import order—an unpredictable and fragile pattern.Additionally:
gallery.pyusedprint()instead of proper logginglogginginside function bodiesChanges
backend/core/config.pyLOG_LEVEL: str = "INFO"settingbackend/core/logging_config.pysetup_logging()functionbackend/main.pysetup_logging()at startupbackend/core/*.py(5 files)basicConfig()callsbackend/api/endpoints/*.py(3 files)basicConfig(), fix anti-patternsLog Format
Usage
Testing
Verified that:
LOG_LEVEL=DEBUGenables debug messages