Skip to content

Commit

Permalink
Change logging to logger
Browse files Browse the repository at this point in the history
  • Loading branch information
nss10 committed Sep 26, 2024
1 parent 5d9db6b commit a524171
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mds/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from starlette.responses import JSONResponse

from .models import db, Metadata, MetadataAlias
from . import config
from . import config, logger

mod = APIRouter()

Expand Down Expand Up @@ -108,11 +108,11 @@ def add_filter(query):
if data:
import time

logging.info(
logger.info(
f" Current time stamp -- time.time() at the beginning of the gino call"
)
metadata_list = await add_filter(Metadata.query).gino.all()
logging.info(f" Current time stamp -- time.time() at the end of the gino call")
logger.info(f" Current time stamp -- time.time() at the end of the gino call")
return {metadata.guid: metadata.data for metadata in metadata_list}
else:
return [
Expand Down Expand Up @@ -161,7 +161,7 @@ async def get_metadata(guid):

if not metadata:
message = f"Alias record exists but GUID not found: {guid}"
logging.error(message)
logger.error(message)
raise HTTPException(HTTP_500_INTERNAL_SERVER_ERROR, message)

return metadata.data
Expand Down

0 comments on commit a524171

Please sign in to comment.