# HG changeset patch # User Marcin Kuzminski # Date 2019-09-10 13:27:51 # Node ID 229a84ce3b6275c56918207a3213d0380214e125 # Parent 66f1ac0050e60118beed9ac4ec15bf1a91428410 request-wrapper: show version for rhodecode in logs. diff --git a/rhodecode/lib/middleware/request_wrapper.py b/rhodecode/lib/middleware/request_wrapper.py --- a/rhodecode/lib/middleware/request_wrapper.py +++ b/rhodecode/lib/middleware/request_wrapper.py @@ -18,10 +18,10 @@ # RhodeCode Enterprise Edition, including its added features, Support services, # and proprietary license terms, please see https://rhodecode.com/licenses/ -import gc import time import logging +import rhodecode from rhodecode.lib.base import get_ip_addr, get_access_path, get_user_agent from rhodecode.lib.utils2 import safe_str @@ -44,11 +44,12 @@ class RequestWrapperTween(object): end = time.time() total = end - start count = request.request_count() + _ver_ = rhodecode.__version__ log.info( - 'Req[%4s] IP: %s %s Request to %s time: %.4fs [%s]', + 'Req[%4s] IP: %s %s Request to %s time: %.4fs [%s], RhodeCode %s', count, get_ip_addr(request.environ), request.environ.get('REQUEST_METHOD'), safe_str(get_access_path(request.environ)), total, - get_user_agent(request. environ) + get_user_agent(request. environ), _ver_ ) return response