comparison rhodecode/lib/middleware/simplegit.py @ 3135:e7ba69286276 beta

logging: include more info in action logging These messages are very frequent and thus shows what is going on on the server - and it is nice to have some extra information to give some context for other messages that might be logged.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 02 Jan 2013 13:54:26 +0100
parents 9b92cf5a0cca
children cd50d1b5f35b 5440ea1d0628
comparison
equal deleted inserted replaced
3134:ff315659d289 3135:e7ba69286276
231 # invalidate cache on push 231 # invalidate cache on push
232 if action == 'push': 232 if action == 'push':
233 self._invalidate_cache(repo_name) 233 self._invalidate_cache(repo_name)
234 self._handle_githooks(repo_name, action, baseui, environ) 234 self._handle_githooks(repo_name, action, baseui, environ)
235 235
236 log.info('%s action on GIT repo "%s"' % (action, repo_name)) 236 log.info('%s action on GIT repo "%s" by "%s" from %s' %
237 (action, repo_name, username, ip_addr))
237 app = self.__make_app(repo_name, repo_path, extras) 238 app = self.__make_app(repo_name, repo_path, extras)
238 return app(environ, start_response) 239 return app(environ, start_response)
239 except HTTPLockedRC, e: 240 except HTTPLockedRC, e:
240 log.debug('Repositry LOCKED ret code 423!') 241 log.debug('Repository LOCKED ret code 423!')
241 return e(environ, start_response) 242 return e(environ, start_response)
242 except Exception: 243 except Exception:
243 log.error(traceback.format_exc()) 244 log.error(traceback.format_exc())
244 return HTTPInternalServerError()(environ, start_response) 245 return HTTPInternalServerError()(environ, start_response)
245 246