- Create logging infrastructure in src/infrastructure/logging/ - logger.py: Main logging setup with console and file handlers - uvicorn_config.py: Custom uvicorn logging configuration - __init__.py: Export public logging API - Update FastAPI application to use logging - Replace all print() statements with proper logger calls - Initialize logging during application startup - Add detailed startup/shutdown logging - Add startup scripts - run_server.py: Python script with uvicorn logging config - start_server.sh: Bash wrapper script - Add comprehensive documentation - docs/logging.md: User guide for logging system - docs/logging_implementation_summary.md: Technical implementation details Features: - Console logging with clean, readable format - File logging with timestamps to logs/fastapi_app.log - Configurable log level via LOG_LEVEL environment variable - Proper lazy formatting for performance - Captures all uvicorn, application, and module logs - Automatic log directory creation
8 lines
279 B
Python
8 lines
279 B
Python
"""
|
|
Logging infrastructure for the Aniworld application.
|
|
"""
|
|
from src.infrastructure.logging.logger import get_logger, setup_logging
|
|
from src.infrastructure.logging.uvicorn_config import get_uvicorn_log_config
|
|
|
|
__all__ = ["setup_logging", "get_logger", "get_uvicorn_log_config"]
|