refactor: Change logging level from info to debug for download and JS messages
Some checks failed
Tests & Quality Checks / Test on Python 3.11 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.12 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.11-1 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.12-1 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.10 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.11-2 (push) Has been cancelled
Tests & Quality Checks / Test on Python 3.12-2 (push) Has been cancelled
Tests & Quality Checks / Build Artifacts (push) Has been cancelled
Tests & Quality Checks / Build Artifacts-1 (push) Has been cancelled

This commit is contained in:
claudi 2026-02-18 13:19:38 +01:00
parent 6d8af7f8fb
commit dffc925bb6
2 changed files with 30 additions and 34 deletions

View file

@ -74,7 +74,7 @@ class CustomWebEnginePage(QWebEnginePage):
]
if any(url_str.lower().endswith(ext) for ext in download_extensions):
logger.info(f"🔽 Detected potential download URL: {url_str}")
logger.debug(f"Detected potential download URL: {url_str}")
# This will trigger downloadRequested if it's a download
return super().acceptNavigationRequest(url, nav_type, is_main_frame)
@ -90,13 +90,13 @@ class CustomWebEnginePage(QWebEnginePage):
Returns:
New page instance for the window
"""
logger.info(f"🪟 New window requested, type: {window_type}")
logger.debug(f"New window requested, type: {window_type}")
# Create a temporary page to handle the download
# This page will never be displayed but allows downloads to work
download_page = QWebEnginePage(self.profile(), self)
logger.info("Created temporary page for download/popup")
logger.debug("Created temporary page for download/popup")
# Return the temporary page - it will trigger downloadRequested if it's a download
return download_page
@ -127,7 +127,7 @@ class RestrictedWebEngineView(QWebEngineView):
custom_page = CustomWebEnginePage(self.profile, self)
self.setPage(custom_page)
logger.info(
logger.debug(
"RestrictedWebEngineView initialized with CustomWebEnginePage and persistent profile"
)
@ -170,9 +170,9 @@ class RestrictedWebEngineView(QWebEngineView):
# Set cache size to 100 MB
profile.setHttpCacheMaximumSize(100 * 1024 * 1024)
logger.info(f"Created persistent profile at: {profile_path}")
logger.info("Cookies policy: ForcePersistentCookies")
logger.info("HTTP cache: DiskHttpCache (100 MB)")
logger.debug(f"Created persistent profile at: {profile_path}")
logger.debug("Cookies policy: ForcePersistentCookies")
logger.debug("HTTP cache: DiskHttpCache (100 MB)")
return profile