diff --git a/amarillo/app/main.py b/amarillo/app/main.py index dd38764..ebe4a3f 100644 --- a/amarillo/app/main.py +++ b/amarillo/app/main.py @@ -6,8 +6,6 @@ import uvicorn import mimetypes from starlette.staticfiles import StaticFiles -logging.config.fileConfig('logging.conf', disable_existing_loggers=False) -logger = logging.getLogger("main") from amarillo.app.utils.utils import copy_static_files #this has to run before app.configuration is imported, otherwise we get validation error for config because the config file is not copied yet @@ -23,6 +21,9 @@ from amarillo.app.views import home # https://pydantic-docs.helpmanual.io/usage/settings/ # from amarillo.app.views import home +logging.config.fileConfig('logging.conf', disable_existing_loggers=False) +logger = logging.getLogger("main") + logger.info("Hello Amarillo!") app = FastAPI(title="Amarillo - The Carpooling Intermediary", diff --git a/amarillo/app/utils/utils.py b/amarillo/app/utils/utils.py index 1e6bde3..59293f0 100644 --- a/amarillo/app/utils/utils.py +++ b/amarillo/app/utils/utils.py @@ -9,6 +9,8 @@ from datetime import datetime, date, timedelta from pyproj import Geod logger = logging.getLogger(__name__) +#logging.conf may not exist yet, so we need to configure the logger to show infos +logging.basicConfig(level=logging.INFO) def assert_folder_exists(foldername): if not os.path.isdir(foldername): diff --git a/pyproject.toml b/pyproject.toml index 51c174f..a036372 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "amarillo-core" -version = "0.0.8" +version = "0.0.9" dependencies = [ "fastapi[all]==0.104.0", "geopandas==0.14",