Skip to content

Instantly share code, notes, and snippets.

@andymckay
Created December 2, 2011 01:35
Show Gist options
  • Save andymckay/1421269 to your computer and use it in GitHub Desktop.
Save andymckay/1421269 to your computer and use it in GitHub Desktop.
diff --git a/apps/amo/utils.py b/apps/amo/utils.py
index 7e95970..ed70720 100644
--- a/apps/amo/utils.py
+++ b/apps/amo/utils.py
@@ -667,5 +667,8 @@ def log_cef(*args, **kwargs):
'cef.vendor': getattr(settings, 'CEF_VENDOR', 'Mozilla'),
'cef.version': getattr(settings, 'CEF_VERSION', '0'),
'cef.device_version': getattr(settings, 'CEF_DEVICE_VERSION', '0'), }
-
+ # Which presumes args[-1] is the request, which sucks. Maybe a keyword
+ # arg would be a little nicer.
+ args = list(args)
+ args[-1] = args[-1].META.copy()
return _log_cef(*args, config=c, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment