Skip to content

Commit 6d40787

Browse files
committed
Revert "Do print instead of logger"
This reverts commit 1b77898.
1 parent 9c1789b commit 6d40787

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/semra/wsgi.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import logging
56
import os
67
from typing import Literal, overload
78

@@ -17,6 +18,9 @@
1718
from semra.web.shared import State
1819

1920

21+
logger = logging.getLogger(__name__)
22+
23+
2024
# docstr-coverage:excused `overload`
2125
@overload
2226
def get_app(
@@ -62,12 +66,12 @@ def get_app(
6266
else:
6367
current_author = biomappings.resources.get_current_curator(strict=False)
6468
if current_author:
65-
print("Loading biomappings resources")
69+
logger.info("Using biomappings resources")
6670
biomappings_git_hash = biomappings.utils.get_git_hash()
6771
for m in biomappings.load_false_mappings():
6872
index_biomapping(false_mapping_index, m)
6973

70-
print("Loading State for the app")
74+
logger.info("Loading State for the app")
7175
name_query = "MATCH (n:concept) WHERE n.name IS NOT NULL RETURN n.name LIMIT 1"
7276
name_example = client.read_query(name_query)
7377
if name_example and len(name_example) > 0 and len(name_example[0]) > 0:
@@ -106,7 +110,7 @@ def get_app(
106110
fastapi_app.state = state # type:ignore
107111
fastapi_app.include_router(api_router)
108112
if add_autocomplete:
109-
print("Adding autocomplete router and building fulltext index")
113+
logger.info("Adding autocomplete router and building fulltext index")
110114
from semra.web.autocomplete.autocomplete_blueprint import auto_router
111115
fastapi_app.include_router(auto_router)
112116
# Create a fulltext index for concept names

0 commit comments

Comments
 (0)