From bb480d329e28a5ab352f73cc8852bc9496308e35 Mon Sep 17 00:00:00 2001 From: TheByronHimes Date: Tue, 2 Jan 2024 13:20:32 +0000 Subject: [PATCH] Configure logging in main module --- src/mass/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mass/main.py b/src/mass/main.py index ebf113a..6d97256 100644 --- a/src/mass/main.py +++ b/src/mass/main.py @@ -15,6 +15,7 @@ # """Top-level functionality for the microservice""" from ghga_service_commons.api import run_server +from hexkit.log import configure_logging from mass.config import Config from mass.inject import prepare_event_subscriber, prepare_rest_app @@ -23,6 +24,7 @@ async def run_rest_app(): """Run the HTTP REST API.""" config = Config() # type: ignore [call-arg] + configure_logging(config=config) async with prepare_rest_app(config=config) as app: await run_server(app=app, config=config) @@ -31,6 +33,7 @@ async def run_rest_app(): async def consume_events(run_forever: bool = True): """Run the event consumer""" config = Config() # type: ignore[call-arg] + configure_logging(config=config) async with prepare_event_subscriber(config=config) as event_subscriber: await event_subscriber.run(forever=run_forever)