changeset 2021:a04844d9c85b beta

better logging
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 22 Feb 2012 21:20:50 +0200
parents bedd7336908c
children b43a121f3137
files rhodecode/lib/middleware/simplegit.py rhodecode/lib/middleware/simplehg.py
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/middleware/simplegit.py	Wed Feb 22 21:20:29 2012 +0200
+++ b/rhodecode/lib/middleware/simplegit.py	Wed Feb 22 21:20:50 2012 +0200
@@ -157,7 +157,7 @@
                 #==============================================================
                 # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME
                 #==============================================================
-
+                log.info('%s action on GIT repo "%s"' % (action, repo_name))
                 if action in ['pull', 'push']:
                     try:
                         user = self.__get_user(username)
--- a/rhodecode/lib/middleware/simplehg.py	Wed Feb 22 21:20:29 2012 +0200
+++ b/rhodecode/lib/middleware/simplehg.py	Wed Feb 22 21:20:50 2012 +0200
@@ -80,7 +80,6 @@
         # GET ACTION PULL or PUSH
         #======================================================================
         action = self.__get_action(environ)
-
         #======================================================================
         # CHECK ANONYMOUS PERMISSION
         #======================================================================
@@ -88,7 +87,7 @@
             anonymous_user = self.__get_user('default')
 
             username = anonymous_user.username
-            anonymous_perm = self._check_permission(action,anonymous_user,
+            anonymous_perm = self._check_permission(action, anonymous_user,
                                                     repo_name)
 
             if anonymous_perm is not True or anonymous_user.active is False:
@@ -121,7 +120,7 @@
                 #==============================================================
                 # CHECK PERMISSIONS FOR THIS REQUEST USING GIVEN USERNAME
                 #==============================================================
-
+                log.info('%s action on HG repo "%s"' % (action, repo_name))
                 if action in ['pull', 'push']:
                     try:
                         user = self.__get_user(username)