Commit 24084755 authored by Yannick's avatar Yannick
Browse files

reduce probe and azure SDK log level

parent f39b5b5e
Pipeline #83504 failed with stages
in 30 minutes and 3 seconds
......@@ -124,18 +124,18 @@ def create_azure_logger(service_name):
# Acquire the logger for azure library
az_logger = logging.getLogger('azure')
az_logger.setLevel(logging.DEBUG)
az_logger.setLevel(logging.INFO)
az_logger.addHandler(stdout_handler)
# Acquire the logger for osdu-core-lib-python-azure
osdu_core_lib_logger = logging.getLogger('osdu_az')
osdu_core_lib_logger.setLevel(logging.DEBUG)
osdu_core_lib_logger.setLevel(logging.INFO)
osdu_core_lib_logger.addHandler(stdout_handler)
osdu_core_lib_logger.addHandler(az_handler)
# Acquire the logger for wdms
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.setLevel(logging.INFO)
logger.addHandler(stdout_handler)
logger.addHandler(az_handler)
......
......@@ -160,5 +160,8 @@ class TracingMiddleware(BaseHTTPMiddleware):
raise
finally:
status = response.status_code if response else HTTP_500_INTERNAL_SERVER_ERROR
ctx.logger.info(utils.process_message(request, status))
if status > 299:
ctx.logger.error(utils.process_message(request, status))
elif not request.url.path.endswith('healthz'):
ctx.logger.info(utils.process_message(request, status))
self._after_request(request, response, tracer)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment