From 8a11dda78f1142347c85d943b11bf0a48e8530fe Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 1 May 2026 15:05:11 -0500 Subject: Use module-level logging rather than the app's logger. --- gn_auth/auth/authorisation/users/collections/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gn_auth/auth/authorisation') diff --git a/gn_auth/auth/authorisation/users/collections/views.py b/gn_auth/auth/authorisation/users/collections/views.py index f619c3d..5ed2c23 100644 --- a/gn_auth/auth/authorisation/users/collections/views.py +++ b/gn_auth/auth/authorisation/users/collections/views.py @@ -1,4 +1,5 @@ """Views regarding user collections.""" +import logging from uuid import UUID from redis import Redis @@ -25,8 +26,10 @@ from .models import ( REDIS_COLLECTIONS_KEY, delete_collections as _delete_collections) +logger = logging.getLogger(__name__) collections = Blueprint("collections", __name__) + @collections.route("/list") @require_oauth("profile user") def list_user_collections() -> Response: @@ -44,7 +47,7 @@ def list_anonymous_collections(anon_id: UUID) -> Response: def __list__(conn: db.DbConnection) -> tuple: try: _user = user_by_id(conn, anon_id) - current_app.logger.warning( + logger.warning( "Fetch collections for authenticated user using the " "`list_user_collections()` endpoint.") return tuple() -- cgit 1.4.1