Get rid of excessive logs

484 Views Asked by At

I'm trying to remove excessive logs in my framework. During test run lot's of useless log records are shown in the console, e.g. logs of urllib3, faker and so on. I'm using Loguru library (tried 'logging' library too -- same result). Already tried:

  1. adding option '--log-level' to the browser options for Selenium (no affect, as expected, checked just to be sure)

  2. os.environ['WDM_LOG'] = str(logging.NOTSET) from official Loguru documentation

  3. urllib3_logger = logging.getLogger('urllib3')

    urllib3_logger.setLevel(logging.WARNING) also gave no effect

Here's test output example:


[WDM] - ====== WebDriver manager ======
2022-11-30 15:11:10 - conftest - INFO - Start local browser chrome
2022-11-30 15:11:10 - utils.driver_setup - DEBUG - Creating local chrome driver 
2022-11-30 15:11:10 - utils.driver_setup.webdriver_factory - DEBUG - Configuring Chrome driver
[WDM] - Current google-chrome version is 107.0.5304
[WDM] - Get LATEST chromedriver version for 107.0.5304 google-chrome
[WDM] - There is no [mac64_m1] chromedriver for browser 107.0.5304 in cache
[WDM] - About to download new driver from https://chromedriver.storage.googleapis.com/107.0.5304.62/chromedriver_mac64_m1.zip
2022-11-30 15:11:31 - utils.driver_setup.webdriver_factory - DEBUG - Getting driver path
2022-11-30 15:11:31 - utils.driver_setup.webdriver_factory - DEBUG - Setting chrome options
2022-11-30 15:11:80 - conftest - INFO - Running precondition: create_business_unit
2022-11-30 15:11:80 - api.business_unit.business_unit_request - DEBUG - Creating business unit with name: automation_bu_1669814565
2022-11-30 15:11:80 - utils.helpers.http_requests - DEBUG - Making POST request to: https://sit.pro.aes/api/business-units with body: {'name': 'automation_bu_1669814565', 'automationFormat': 0, 'receiverNumber': 1, 'alarmAutomationId': 1, 'oldAlarms': 0, 'ipLinks': [], 'ipGroups': [], 'universal': False, 'isDefault': False}
2022-11-30 15:11:36 - conftest - INFO - Running precondition: signin_ui_admin
2022-11-30 15:11:36 - conftest - DEBUG - Signing in as admin: Automation
2022-11-30 15:11:10 - pages.actions.signin_page - DEBUG - Entering username Automation
2022-11-30 15:11:24 - pages.actions.signin_page - DEBUG - Entering password
2022-11-30 15:11:30 - pages.actions.signin_page - DEBUG - Click on signin button
2022-11-30 15:11:35 - pages.actions.common_elements - DEBUG - Accepting start working dialog
2022-11-30 15:11:91 - tests.business_unit.test_INCC_2448_add_non_AES_unit - INFO - Open tab "Business Units" tab
2022-11-30 15:11:91 - pages.actions.common_elements - DEBUG - Opening tab business units
2022-11-30 15:11:18 - tests.business_unit.test_INCC_2448_add_non_AES_unit - INFO - Open business unit: automation_bu_1669814565
2022-11-30 15:11:18 - pages.actions.business_units_page - DEBUG - Opening business unit: automation_bu_1669814565
2022-11-30 15:11:54 - tests.business_unit.test_INCC_2448_add_non_AES_unit - INFO - Add Non-AES Unit with id: 8166
2022-11-30 15:11:54 - pages.actions.business_units_page - DEBUG - Opening business unit tab: Non-AES Units
2022-11-30 15:11:10 - pages.actions.business_units_page - DEBUG - Adding non-AES unit with id: 8166
2022-11-30 15:11:28 - tests.business_unit.test_INCC_2448_add_non_AES_unit - INFO - Verify Non-AES Unit: 8166 is created and present in the list of Non-AES Units
2022-11-30 15:11:29 - pages.actions.business_units_page - DEBUG - Getting non-AES units
PASSED2022-11-30 15:11:32 - api.business_unit.business_unit_request - DEBUG - Deleting business unit with id: 363
2022-11-30 15:11:32 - utils.helpers.http_requests - DEBUG - Making DELETE request to: https://sit.pro.aes/api/business-units/363
2022-11-30 15:11:80 - conftest - INFO - STATUS: PASSED. test_incc_2448_add_non_aes_unit[signin_ui_admin0-chrome]
2022-11-30 15:11:80 - conftest - INFO - Quit driver

tests/business_unit/test_INCC_2448_add_non_AES_unit.py::TestINCC2448AddNonAESUnit::test_incc_2448_add_non_aes_unit[signin_ui_admin0-chrome] ERROR

=============================================================================== ERRORS ===============================================================================
______________________________ ERROR at teardown of TestINCC2448AddNonAESUnit.test_incc_2448_add_non_aes_unit[signin_ui_admin0-chrome] _______________________________
venv/lib/python3.10/site-packages/urllib3/connectionpool.py:449: in _make_request
    six.raise_from(e, None)
<string>:3: in raise_from
    ???
venv/lib/python3.10/site-packages/urllib3/connectionpool.py:444: in _make_request
    httplib_response = conn.getresponse()
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py:1374: in getresponse
    response.begin()
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py:318: in begin
    version, status, reason = self._read_status()
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py:279: in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socket.py:705: in readinto
    return self._sock.recv_into(b)
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py:1273: in recv_into
    return self.read(nbytes, buffer)
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py:1129: in read
    return self._sslobj.read(len, buffer)
E   TimeoutError: The read operation timed out

During handling of the above exception, another exception occurred:
venv/lib/python3.10/site-packages/requests/adapters.py:440: in send
    resp = conn.urlopen(
venv/lib/python3.10/site-packages/urllib3/connectionpool.py:785: in urlopen
    retries = retries.increment(
venv/lib/python3.10/site-packages/urllib3/util/retry.py:550: in increment
    raise six.reraise(type(error), error, _stacktrace)
venv/lib/python3.10/site-packages/urllib3/packages/six.py:770: in reraise
    raise value
venv/lib/python3.10/site-packages/urllib3/connectionpool.py:703: in urlopen
    httplib_response = self._make_request(
venv/lib/python3.10/site-packages/urllib3/connectionpool.py:451: in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
venv/lib/python3.10/site-packages/urllib3/connectionpool.py:340: in _raise_timeout
    raise ReadTimeoutError(
E   urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='sit.pro.aes', port=443): Read timed out. (read timeout=20)

During handling of the above exception, another exception occurred:
conftest.py:159: in create_business_unit
    temp_bu.delete()
entities/business_unit.py:50: in delete
    BusinessUnitAPI().delete_business_unit(bu_id=self.id_)
api/business_unit/business_unit_request.py:54: in delete_business_unit
    return BaseHTTPRequest().delete(url=self.url, headers=self.headers,
utils/helpers/http_requests.py:103: in delete
    response = session.delete(url=request_url, headers=headers,
venv/lib/python3.10/site-packages/requests/sessions.py:611: in delete
    return self.request('DELETE', url, **kwargs)
venv/lib/python3.10/site-packages/requests/sessions.py:529: in request
    resp = self.send(prep, **send_kwargs)
venv/lib/python3.10/site-packages/requests/sessions.py:645: in send
    r = adapter.send(request, **kwargs)
venv/lib/python3.10/site-packages/requests/adapters.py:532: in send
    raise ReadTimeout(e, request=request)
E   requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='sit.pro.aes', port=443): Read timed out. (read timeout=20)
------------------------------------------------------------------------- Captured log setup -------------------------------------------------------------------------
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.address`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.address` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.automotive`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.automotive` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.bank`.
DEBUG    faker.factory:factory.py:88 Specified locale `en_US` is not available for provider `faker.providers.bank`. Locale reset to `en_GB` for this provider.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.barcode`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.barcode` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.color`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.color` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.company`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.company` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.credit_card`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.credit_card` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.currency`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.currency` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.date_time`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.date_time` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:109 Provider `faker.providers.file` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.geo`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.geo` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.internet`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.internet` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:109 Provider `faker.providers.isbn` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.job`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.job` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.lorem`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.lorem` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.misc`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.misc` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.person`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.person` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.phone_number`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.phone_number` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:109 Provider `faker.providers.profile` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG    faker.factory:factory.py:109 Provider `faker.providers.python` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG    faker.factory:factory.py:78 Looking for locale `en_US` in provider `faker.providers.ssn`.
DEBUG    faker.factory:factory.py:97 Provider `faker.providers.ssn` has been localized to `en_US`.
DEBUG    faker.factory:factory.py:109 Provider `faker.providers.user_agent` does not feature localization. Specified locale `en_US` is not utilized for this provider.
DEBUG    urllib3.connectionpool:connectionpool.py:1001 Starting new HTTPS connection (1): sit.pro.aes:443
DEBUG    urllib3.connectionpool:connectionpool.py:456 https://sit.pro.aes:443 "POST /api/auth/login HTTP/1.1" 200 None
INFO     WDM:logger.py:16 ====== WebDriver manager ======
INFO     WDM:logger.py:16 Current google-chrome version is 107.0.5304
INFO     WDM:logger.py:16 Get LATEST chromedriver version for 107.0.5304 google-chrome
DEBUG    urllib3.connectionpool:connectionpool.py:1001 Starting new HTTPS connection (1): chromedriver.storage.googleapis.com:443
DEBUG    urllib3.connectionpool:connectionpool.py:456 https://chromedriver.storage.googleapis.com:443 "GET /LATEST_RELEASE_107.0.5304 HTTP/1.1" 200 13
INFO     WDM:logger.py:16 There is no [mac64_m1] chromedriver for browser 107.0.5304 in cache
INFO     WDM:logger.py:16 About to download new driver from https://chromedriver.storage.googleapis.com/107.0.5304.62/chromedriver_mac64_m1.zip
DEBUG    urllib3.connectionpool:connectionpool.py:1001 Starting new HTTPS connection (1): chromedriver.storage.googleapis.com:443
DEBUG    urllib3.connectionpool:connectionpool.py:456 https://chromedriver.storage.googleapis.com:443 "GET /107.0.5304.62/chromedriver_mac64_m1.zip HTTP/1.1" 404 214
DEBUG    urllib3.connectionpool:connectionpool.py:228 Starting new HTTP connection (1): localhost:65482
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session HTTP/1.1" 200 800
DEBUG    urllib3.connectionpool:connectionpool.py:1001 Starting new HTTPS connection (1): sit.pro.aes:443
DEBUG    urllib3.connectionpool:connectionpool.py:456 https://sit.pro.aes:443 "POST /api/business-units HTTP/1.1" 201 None
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/url HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "GET /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/d3c7db4e-6baf-45dd-b2d2-4923838a1adf/enabled HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/d3c7db4e-6baf-45dd-b2d2-4923838a1adf/click HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/d3c7db4e-6baf-45dd-b2d2-4923838a1adf/value HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "GET /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/deed88c1-4597-433d-a62e-aff695ca7b1c/enabled HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/deed88c1-4597-433d-a62e-aff695ca7b1c/click HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/deed88c1-4597-433d-a62e-aff695ca7b1c/value HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "GET /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/b327d044-ca75-4e95-9975-5994eaba406b/enabled HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/b327d044-ca75-4e95-9975-5994eaba406b/click HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 404 1609
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 404 1609
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 404 1609
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 404 1609
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 404 1609
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "GET /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/546a51ff-098b-4716-893b-0991291f5f39/enabled HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/546a51ff-098b-4716-893b-0991291f5f39/click HTTP/1.1" 200 14
------------------------------------------------------------------------- Captured log call --------------------------------------------------------------------------
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "GET /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/6a32443e-b03f-4100-a981-94246cabae28/enabled HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/6a32443e-b03f-4100-a981-94246cabae28/click HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 404 1643
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 404 1643
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 404 1643
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/elements HTTP/1.1" 200 1591
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 23
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 15
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 26
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 25
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 18
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 18
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 29
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 21
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 26
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 16
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 25
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 16
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 19
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 17
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 17
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 25
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 26
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 25
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 16
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 26
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "GET /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/3559f863-d3f5-425a-956e-aa6d6a0062e3/enabled HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element/3559f863-d3f5-425a-956e-aa6d6a0062e3/click HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 404 1643
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/elements HTTP/1.1" 200 959
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 25
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 21
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 21
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 36
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 36
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 36
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 36
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 36
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 36
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 36
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 36
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 36
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/element HTTP/1.1" 200 88
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST /session/dc247c59fdf65c04f90f3ceb73afe5c5/execute/sync HTTP/1.1" 200 14
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "POST 
----------------------------------------------------------------------- Captured log teardown ------------------------------------------------------------------------
DEBUG    urllib3.connectionpool:connectionpool.py:1001 Starting new HTTPS connection (1): sit.pro.aes:443
DEBUG    urllib3.connectionpool:connectionpool.py:456 http://localhost:65482 "DELETE /session/dc247c59fdf65c04f90f3ceb73afe5c5 HTTP/1.1" 200 14

I want to hide logs of Captured log setup, Captured log call, Captured log teardown and [WDM]. I can change log level manually to 'INFO' (currently it's set to DEBUG), but in that case I'm losing DEBUG records which I create manually on purpose, like this one: 2022-11-30 15:11:30 - pages.actions.signin_page - DEBUG - Click on signin button. Also I can execute test with pytest parameter --tb=no and all useless records are not displayed, but I'm losing error traceback in that case

1

There are 1 best solutions below

0
Krematory On

Issue was related to the pytest.

This post helped. Just need to add -p no:logging to the run command or to the pytest.ini file