X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fmrstub%2Fapp%2Fmain.py;h=75b23f125f9510510c3bf3cfbc160cbadb8135e7;hb=b83e54c2bdab21d7f6ff5c9a4c340e801c93e1c2;hp=8804a0448abed9cd3dd783476f7b8b5830b23f6a;hpb=0f9d5174c5d828bd6c653f611052633d7b0fdc21;p=nonrtric.git diff --git a/test/mrstub/app/main.py b/test/mrstub/app/main.py index 8804a044..75b23f12 100644 --- a/test/mrstub/app/main.py +++ b/test/mrstub/app/main.py @@ -25,6 +25,15 @@ from flask import Flask from flask import Response import traceback from threading import RLock +import logging + +# Disable all logging of GET on reading counters +class AjaxFilter(logging.Filter): + def filter(self, record): + return ("/counter/" not in record.getMessage()) + +log = logging.getLogger('werkzeug') +log.addFilter(AjaxFilter()) app = Flask(__name__) lock = RLock()