# HG changeset patch # User Marcin Kuzminski # Date 2019-09-10 13:27:29 # Node ID 200e352511e37228493a03fe6443ff19f0831c73 # Parent c6b590ae2f2053ea10faeb55e5dce96513686844 request-wrapper: show version for vcsserver in logs. diff --git a/vcsserver/tweens/request_wrapper.py b/vcsserver/tweens/request_wrapper.py --- a/vcsserver/tweens/request_wrapper.py +++ b/vcsserver/tweens/request_wrapper.py @@ -15,11 +15,10 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -import gc import time import logging - +import vcsserver from vcsserver.utils import safe_str @@ -50,10 +49,11 @@ class RequestWrapperTween(object): end = time.time() total = end - start count = request.request_count() + _ver_ = vcsserver.__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], VCSServer %s', count, '127.0.0.1', request.environ.get('REQUEST_METHOD'), - safe_str(get_access_path(request)), total, get_user_agent(request.environ)) + safe_str(get_access_path(request)), total, get_user_agent(request.environ), _ver_) return response