import uvicorn
from src.config.settings import settings
from src.config.logging_config import setup_logging, get_logger
setup_logging()
logger = get_logger(__name__)
if __name__ == '__main__':
    logger.info(f'Starting {settings.APP_NAME} on {settings.HOST}:{settings.PORT}')
    import os
    from pathlib import Path
    base_dir = Path(__file__).parent
    src_dir = str(base_dir / 'src')
    use_reload = False
    uvicorn.run('src.main:app', host=settings.HOST, port=settings.PORT, reload=use_reload, log_level=settings.LOG_LEVEL.lower(), reload_dirs=[src_dir] if use_reload else None, reload_excludes=['*.log', '*.pyc', '*.pyo', '*.pyd', '__pycache__', '**/__pycache__/**', '*.db', '*.sqlite', '*.sqlite3'], reload_delay=1.0)