Change logging level from DEBUG to INFO

- Update fastapi_app.py to use INFO level instead of DEBUG
- Update development.py config to default to INFO instead of DEBUG
- Update uvicorn log_level from debug to info
- Prevents debug messages from appearing in logs
This commit is contained in:
Lukas 2026-01-07 19:41:39 +01:00
parent bd655cb0f0
commit 4f2d652a69
3 changed files with 16 additions and 12 deletions

View File

@ -109,21 +109,25 @@ For each task completed:
## Completed Tasks: ## Completed Tasks:
### ✅ Debug Logging (2026-01-07) ### ✅ Debug Logging (2026-01-07)
Verified that the logging is correctly set to INFO level and not DEBUG for both console and file handlers. The configuration in [src/infrastructure/logging/logger.py](src/infrastructure/logging/logger.py) properly uses the log level from settings, which defaults to INFO. Verified that the logging is correctly set to INFO level and not DEBUG for both console and file handlers. The configuration in [src/infrastructure/logging/logger.py](src/infrastructure/logging/logger.py) properly uses the log level from settings, which defaults to INFO.
### ✅ Fix Download Issue (2026-01-07) ### ✅ Fix Download Issue (2026-01-07)
Fixed the TypeError in download functionality where `self.events.download_progress` was set to None when trying to subscribe a handler.
Fixed the TypeError in download functionality where `self.events.download_progress` was set to None when trying to subscribe a handler.
**Changes made:** **Changes made:**
- Removed `self.events.download_progress = None` from [src/core/providers/aniworld_provider.py](src/core/providers/aniworld_provider.py#L109)
- Removed `self._events.download_status = None` and `self._events.scan_status = None` from [src/core/SeriesApp.py](src/core/SeriesApp.py#L157-158) - Removed `self.events.download_progress = None` from [src/core/providers/aniworld_provider.py](src/core/providers/aniworld_provider.py#L109)
- Removed `self._events.download_status = None` and `self._events.scan_status = None` from [src/core/SeriesApp.py](src/core/SeriesApp.py#L157-158)
The Events library requires that events are not initialized to None. After creating the `Events()` object, event attributes are automatically handled by the library and can be subscribed to immediately. The Events library requires that events are not initialized to None. After creating the `Events()` object, event attributes are automatically handled by the library and can be subscribed to immediately.
**Testing:** **Testing:**
- Verified event initialization works correctly for both AniworldLoader and SeriesApp
- Confirmed that event subscription works without errors - Verified event initialization works correctly for both AniworldLoader and SeriesApp
- Unit tests continue to pass (251 passed) - Confirmed that event subscription works without errors
- Unit tests continue to pass (251 passed)
--- ---

View File

@ -8,7 +8,7 @@ Environment Variables:
JWT_SECRET_KEY: Secret key for JWT token signing (default: dev-secret) JWT_SECRET_KEY: Secret key for JWT token signing (default: dev-secret)
PASSWORD_SALT: Salt for password hashing (default: dev-salt) PASSWORD_SALT: Salt for password hashing (default: dev-salt)
DATABASE_URL: Development database connection string (default: SQLite) DATABASE_URL: Development database connection string (default: SQLite)
LOG_LEVEL: Logging level (default: DEBUG) LOG_LEVEL: Logging level (default: INFO)
CORS_ORIGINS: Comma-separated list of allowed CORS origins CORS_ORIGINS: Comma-separated list of allowed CORS origins
API_RATE_LIMIT: API rate limit per minute (default: 1000) API_RATE_LIMIT: API rate limit per minute (default: 1000)
""" """
@ -91,8 +91,8 @@ class DevelopmentSettings(BaseSettings):
# Logging Settings # Logging Settings
# ============================================================================ # ============================================================================
log_level: str = Field(default="DEBUG", env="LOG_LEVEL") log_level: str = Field(default="INFO", env="LOG_LEVEL")
"""Logging level (DEBUG for detailed output).""" """Logging level (INFO for standard output)."""
log_file: str = Field(default="logs/development.log", env="LOG_FILE") log_file: str = Field(default="logs/development.log", env="LOG_FILE")
"""Path to development log file.""" """Path to development log file."""

View File

@ -51,8 +51,8 @@ async def lifespan(_application: FastAPI):
_application: The FastAPI application instance (unused but required _application: The FastAPI application instance (unused but required
by the lifespan protocol). by the lifespan protocol).
""" """
# Setup logging first with DEBUG level # Setup logging first with INFO level
logger = setup_logging(log_level="DEBUG") logger = setup_logging(log_level="INFO")
# Startup # Startup
try: try:
@ -306,5 +306,5 @@ if __name__ == "__main__":
host="127.0.0.1", host="127.0.0.1",
port=8000, port=8000,
reload=True, reload=True,
log_level="debug" log_level="info"
) )