From bbaad98f08c9e2537c01967bee81d523cb979071 Mon Sep 17 00:00:00 2001
From: Tanner Prestegard <tanner.prestegard@ligo.org>
Date: Tue, 13 Nov 2018 14:38:48 -0600
Subject: [PATCH] Adding logging to a few functions

---
 gracedb/api/v1/main/views.py     | 4 ++++
 gracedb/core/middleware/proxy.py | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/gracedb/api/v1/main/views.py b/gracedb/api/v1/main/views.py
index b83b3a9bc..056b2c674 100644
--- a/gracedb/api/v1/main/views.py
+++ b/gracedb/api/v1/main/views.py
@@ -1,6 +1,7 @@
 # Needed because our local events and superevents modules (for the API)
 # shadow the names of the events and superevents apps.
 from __future__ import absolute_import
+import logging
 
 from django.conf import settings
 from django.contrib.auth.models import Group as AuthGroup
@@ -20,6 +21,9 @@ from events.view_logic import get_performance_info
 from superevents.models import Superevent
 from ..superevents.url_templates import construct_url_templates
 
+# Set up logger
+logger = logging.getLogger(__name__)
+
 
 class TagList(APIView):
     """Tag List Resource
diff --git a/gracedb/core/middleware/proxy.py b/gracedb/core/middleware/proxy.py
index c9293ad34..0f989656a 100644
--- a/gracedb/core/middleware/proxy.py
+++ b/gracedb/core/middleware/proxy.py
@@ -1,3 +1,7 @@
+import logging
+
+# Set up logger
+logger = logging.getLogger(__name__)
 
 
 class XForwardedForMiddleware(object):
-- 
GitLab