X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fmrstub%2Fapp%2Fmain.py;h=75b23f125f9510510c3bf3cfbc160cbadb8135e7;hb=17f4f61179cb67ab0d3ab6ed52df0aa51e0cf6c4;hp=8804a0448abed9cd3dd783476f7b8b5830b23f6a;hpb=bee5b1771393f08c55011f3ed3efc924a5878e70;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()