fix: redirect cssutils logger to file (#28692)

This commit is contained in:
David Arnold 2024-12-08 09:12:18 +01:00 committed by GitHub
parent 4bb972e0b9
commit d17136cd04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -2390,7 +2390,9 @@ loggers: dict[str, "Logger"] = {}
log_level: int | None = None
def logger(module=None, with_more_info=False, allow_site=True, filter=None, max_size=100_000, file_count=20):
def logger(
module=None, with_more_info=False, allow_site=True, filter=None, max_size=100_000, file_count=20
) -> "Logger":
"""Return a python logger that uses StreamHandler."""
from frappe.utils.logger import get_logger

View file

@ -23,6 +23,8 @@ from frappe.utils import cstr, scrub_urls
from frappe.utils.caching import redis_cache
from frappe.utils.jinja_globals import bundled_asset, is_rtl
cssutils.log.setLog(frappe.logger("cssutils"))
PDF_CONTENT_ERRORS = [
"ContentNotFoundError",
"ContentOperationNotPermittedError",