# HG changeset patch # User Mads Kiilerich # Date 2013-01-02 12:54:26 # Node ID e7ba69286276851163207b22d025275f75d7bf36 # Parent ff315659d2899b568d2ff02cf7b8d2f319d2b2ee 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. diff --git a/rhodecode/lib/middleware/simplegit.py b/rhodecode/lib/middleware/simplegit.py --- a/rhodecode/lib/middleware/simplegit.py +++ b/rhodecode/lib/middleware/simplegit.py @@ -233,11 +233,12 @@ class SimpleGit(BaseVCSController): self._invalidate_cache(repo_name) self._handle_githooks(repo_name, action, baseui, environ) - log.info('%s action on GIT repo "%s"' % (action, repo_name)) + log.info('%s action on GIT repo "%s" by "%s" from %s' % + (action, repo_name, username, ip_addr)) app = self.__make_app(repo_name, repo_path, extras) return app(environ, start_response) except HTTPLockedRC, e: - log.debug('Repositry LOCKED ret code 423!') + log.debug('Repository LOCKED ret code 423!') return e(environ, start_response) except Exception: log.error(traceback.format_exc()) diff --git a/rhodecode/lib/middleware/simplehg.py b/rhodecode/lib/middleware/simplehg.py --- a/rhodecode/lib/middleware/simplehg.py +++ b/rhodecode/lib/middleware/simplehg.py @@ -194,14 +194,15 @@ class SimpleHg(BaseVCSController): # invalidate cache on push if action == 'push': self._invalidate_cache(repo_name) - log.info('%s action on HG repo "%s"' % (action, repo_name)) + log.info('%s action on HG repo "%s" by "%s" from %s' % + (action, repo_name, username, ip_addr)) app = self.__make_app(repo_path, baseui, extras) return app(environ, start_response) except RepoError, e: if str(e).find('not found') != -1: return HTTPNotFound()(environ, start_response) except HTTPLockedRC, e: - log.debug('Repositry LOCKED ret code 423!') + log.debug('Repository LOCKED ret code 423!') return e(environ, start_response) except Exception: log.error(traceback.format_exc())