Commits

Arne Brodowski committed 8095607

log remote-ip and user-agent

Comments (0)

Files changed (2)

dogslow/__init__.py

                 '%s\n' \
                 'Thread ID:  %d\n' \
                 'Process ID: %d\n' \
-                'Started:    %s\n\n' % \
+                'Started:    %s\n' \
+                'Remote-IP:  %s\n' \
+                'User-Agent: %s\n\n'% \
                     (dt.datetime.utcnow().strftime("%d-%m-%Y %H:%M:%S UTC"),
                      req_string,
                      thread_id,
                      os.getpid(),
-                     started.strftime("%d-%m-%Y %H:%M:%S UTC"),)
+                     started.strftime("%d-%m-%Y %H:%M:%S UTC"),
+                     request.META.get('REMOTE_ADDR', ''),
+                     request.META.get('HTTP_USER_AGENT', ''),
+                    )
 
             output += stack(frame, with_locals=False)
             output += '\n\n'
     name='dogslow',
     packages=['dogslow'],
     url='https://bitbucket.org/evzijst/dogslow',
-    version='0.9.2',
+    version='0.9.2a1',
 )