From 11ddecc56e2a270cbd983213db32534939b8079a Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Wed, 31 Jul 2024 16:31:10 +0000 Subject: [PATCH] Configure logging --- src/metldata/cli.py | 2 ++ src/metldata/load/config.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/metldata/cli.py b/src/metldata/cli.py index 700ba44..135e05e 100644 --- a/src/metldata/cli.py +++ b/src/metldata/cli.py @@ -21,6 +21,7 @@ import typer from ghga_service_commons.api import run_server +from hexkit.log import configure_logging from metldata.combined import get_app from metldata.config import Config @@ -43,5 +44,6 @@ def wrapper(*args, **kwargs): async def run_api() -> None: """Run the combined loader and query API.""" config = Config() # type: ignore + configure_logging(config=config) app = await get_app(config=config) await run_server(app=app, config=config) diff --git a/src/metldata/load/config.py b/src/metldata/load/config.py index d6535c6..2b3e8bf 100644 --- a/src/metldata/load/config.py +++ b/src/metldata/load/config.py @@ -17,6 +17,7 @@ """Config parameters and their defaults.""" from ghga_service_commons.api import ApiConfigBase +from hexkit.log import LoggingConfig from hexkit.providers.akafka import KafkaConfig from hexkit.providers.mongodb import MongoDbConfig from pydantic import Field @@ -33,6 +34,7 @@ class ArtifactLoaderAPIConfig( EventPubTranslatorConfig, KafkaConfig, MongoDbConfig, + LoggingConfig, ): """Config settings for the loader API."""