From b8efe15c0af46027d7c3df0eb2c47467ae2fc982 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 27 Jul 2021 17:16:58 +0300 Subject: [PATCH] removed debug logs from scodoc7 decorators --- app/decorators.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/decorators.py b/app/decorators.py index b28181d68..846c29153 100644 --- a/app/decorators.py +++ b/app/decorators.py @@ -64,12 +64,12 @@ class ZRequest(object): elif request.method == "GET": self.form = {} for k in request.args: - current_app.logger.debug("%s\t%s" % (k, request.args.getlist(k))) + # current_app.logger.debug("%s\t%s" % (k, request.args.getlist(k))) if k.endswith(":list"): self.form[k[:-5]] = request.args.getlist(k) else: self.form[k] = request.args[k] - current_app.logger.info("ZRequest.form=%s" % str(self.form)) + # current_app.logger.info("ZRequest.form=%s" % str(self.form)) self.RESPONSE = ZResponse() def __str__(self): @@ -91,7 +91,7 @@ class ZResponse(object): self.headers = {} def redirect(self, url): - current_app.logger.debug("ZResponse redirect to:" + str(url)) + # current_app.logger.debug("ZResponse redirect to:" + str(url)) return flask.redirect(url) # http 302 def setHeader(self, header, value): @@ -165,7 +165,7 @@ def scodoc7func(context): pos_arg_values = [] # PY3 à remplacer par inspect.getfullargspec en py3: TODO argspec = inspect.getargspec(func) - current_app.logger.info("argspec=%s" % str(argspec)) + # current_app.logger.info("argspec=%s" % str(argspec)) nb_default_args = len(argspec.defaults) if argspec.defaults else 0 if nb_default_args: arg_names = argspec.args[:-nb_default_args] @@ -178,8 +178,8 @@ def scodoc7func(context): pos_arg_values.append(context) else: pos_arg_values.append(req_args[arg_name]) - current_app.logger.info("pos_arg_values=%s" % pos_arg_values) - current_app.logger.info("req_args=%s" % req_args) + # current_app.logger.info("pos_arg_values=%s" % pos_arg_values) + # current_app.logger.info("req_args=%s" % req_args) # Add keyword arguments if nb_default_args: for arg_name in argspec.args[-nb_default_args:]: @@ -188,10 +188,10 @@ def scodoc7func(context): elif arg_name in req_args: # set argument kw optionnel kwargs[arg_name] = req_args[arg_name] - current_app.logger.info( - "scodoc7func_decorator: top_level=%s, pos_arg_values=%s, kwargs=%s" - % (top_level, pos_arg_values, kwargs) - ) + # current_app.logger.info( + # "scodoc7func_decorator: top_level=%s, pos_arg_values=%s, kwargs=%s" + # % (top_level, pos_arg_values, kwargs) + # ) value = func(*pos_arg_values, **kwargs) if not top_level: