From 95d98ac139cf9704b67e1133a6ae9f56b4bb5b7f Mon Sep 17 00:00:00 2001 From: Andy Doan Date: Fri, 5 Feb 2016 10:56:31 -0600 Subject: reports: log meta variables when IP can't be found We should log the META information so we can come back to this later and understand how we fail to determine an IP address. Change-Id: I4fd189bc91c5f50646babbaebe9d3c823dd1187b --- license_protected_downloads/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/license_protected_downloads/models.py b/license_protected_downloads/models.py index f35538b..8393f95 100644 --- a/license_protected_downloads/models.py +++ b/license_protected_downloads/models.py @@ -34,6 +34,8 @@ def get_ip(request): ip = request.META.get(field) if ip and ip != 'unknown': return ip.split(',')[0] + + logging.warn('Unable to find request ip: %r', request.META) return 'unkwnown' -- cgit v1.2.3