I have a pytest.ini file as such:
log_cli = 1
log_cli_level = INFO
log_cli_format = [%(levelname)s]: %(message)s
;log_file = ./Logs/pytest_.log
log_file_level = INFO
log_file_format = %(asctime)s [%(levelname)s]: %(message)s
log_file_date_format=%Y-%m-%d %H:%M:%S
When executing, the live logs and the file logs follow the given format, but there are also "Captured logs" that are printed and they do not follow the given format. Is there any way to modify the format of the "Captured Log". Here is an example output:
------- live log setup ---------
[INFO]: Using local chrome browser....
[INFO]: Successfully logged in
[INFO]: Click Customer Success
[INFO]: The Dashboard Loaded Successfully
--- Captured log setup ---------
INFO conftest:conftest.py:46 Using local chrome browser....
INFO conftest:conftest.py:125 Successfully logged in
INFO page_objects.CommonPageObjects:CommonPageObjects.py:292 Click Customer Success
INFO page_objects.CommonPageObjects:CommonPageObjects.py:300 The Dashboard Loaded Successfully