Add structured logging with zerolog

- Implement zerolog logger package with configurable levels
- Add contextual logging middleware (request_id, user_id, method, path, status, duration)
- Support both JSON (production) and human-readable (development) formats
- Add LOG_LEVEL and ENVIRONMENT configuration variables
- Replace standard log calls with structured logger throughout application
- Integrate logger in HTTP router and auth middleware
This commit is contained in:
2025-12-04 23:22:05 +01:00
parent 7575853355
commit 29f0f9b468
9 changed files with 225 additions and 16 deletions
+4
View File
@@ -25,3 +25,7 @@ SEND_WELCOME_EMAIL=false
# Registration Control
REGISTRATION_MODE=open
# Logging Configuration
LOG_LEVEL=info
ENVIRONMENT=production