Commit c46fe077 authored by Zhaoyang Li's avatar Zhaoyang Li Committed by Chromium LUCI CQ

[iOS][test runner] Use warning log level in requests.

When reporting test results to ResultSink, this could reduce log spams
stating post success for each test result.

Bug: 1157537
Change-Id: Ibdb67d22e192c1967038a4ceaeef7d2d82f0edd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2590647Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Commit-Queue: Zhaoyang Li <zhaoyangli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841667}
parent ea47b107
......@@ -106,11 +106,15 @@ class ResultSinkClient(object):
# Ensure session is closed at exit.
atexit.register(self.close)
logging.getLogger("requests").setLevel(logging.WARNING)
def close(self):
"""Closes the connection to result sink server."""
if not self.sink:
return
LOGGER.info('Closing connection with result sink server.')
# Reset to default logging level of test runner scripts.
logging.getLogger("requests").setLevel(logging.DEBUG)
self._session.close()
def post(self, test_result):
......
Markdown is supported
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