Ë
    ©2Úi   ã                   ó>  — d Z ddlZddlZ ej                  d«      Zej
                  s;ej                  ej                  «       ej                   ej                  «       «        ej                  d«      Z
 G d„ dej                  «      Zej                  dd„«       Zy)	a(  Logging setup.

The rest of the code gets the logger through this module rather than
``logging.getLogger`` to make sure that it is configured.

Logging levels are used for specific purposes:

- errors are used in ``LOGGER`` for unreachable or unusable external resources,
  including unreachable stylesheets, unreachables images and unreadable images;
- warnings are used in ``LOGGER`` for unknown or bad HTML/CSS syntaxes,
  unreachable local fonts and various non-fatal problems;
- infos are used in ``PROCESS_LOGGER`` to advertise rendering steps.

é    NÚ
weasyprintúweasyprint.progressc                   ó   — e Zd ZdZd„ Zy)ÚCallbackHandlerz:A logging handler that calls a function for every message.c                 óP   — t         j                  j                  | «       || _        y )N)ÚloggingÚHandlerÚ__init__Úemit)ÚselfÚcallbacks     úH/var/www/html/acx/venv/lib/python3.12/site-packages/weasyprint/logger.pyr
   zCallbackHandler.__init__   s   € Ü�‰× Ñ  Ô&Øˆ�	ó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   © r   r   r   r      s
   „ ÙDór   r   c              #   ó’  ‡‡K  — ‰€t         j                  Št        j                  | «      } g Šˆˆfd„}| j                  }| j                  }g | _        | j                  t        |«      «       | j                  t         j                  «       	 ‰–— || _        | j                  |«       y# || _        | j                  |«       w xY w­w)z;Return a context manager that captures all logged messages.Nc                 ó¾   •— | j                   dk(  ry | j                  ‰k  ry ‰j                  | j                  j	                  «       › d| j                  «       › �«       y )Nr   z: )ÚnameÚlevelnoÚappendÚ	levelnameÚupperÚ
getMessage)ÚrecordÚlevelÚmessagess    €€r   r   zcapture_logs.<locals>.emit*   sS   ø€ Ø�;‰;Ð/Ò/ØØ�>‰>˜EÒ!ØØ�‰˜6×+Ñ+×1Ñ1Ó3Ð4°B°v×7HÑ7HÓ7JÐ6KÐLÕMr   )	r   ÚINFOÚ	getLoggerÚhandlersr   Ú
addHandlerr   ÚsetLevelÚDEBUG)Úloggerr   r   Úprevious_handlersÚprevious_levelr   s    `   @r   Úcapture_logsr)   "   s¤   ùè ø€ ð €}Ü—‘ˆÜ×Ñ˜vÓ&€FØ€HõNð Ÿ™ÐØ—\‘\€NØ€F„OØ
×Ñ”o dÓ+Ô,Ø
‡O�O”G—M‘MÔ"ð(ØŠà+ˆŒØ�‰˜Õ'øð ,ˆŒØ�‰˜Õ'üs   „BCÂB* ÂCÂ*CÃC)r   N)r   Ú
contextlibr   r!   ÚLOGGERr"   r$   ÚWARNINGr#   ÚNullHandlerÚPROGRESS_LOGGERr	   r   Úcontextmanagerr)   r   r   r   ú<module>r0      s’   ðñó Û à	ˆ×	Ñ	˜<Ó	(€Ø‡‚Ø
‡O�O�G—O‘OÔ$Ø
×ÑÐ)�g×)Ñ)Ó+Ô,à#�'×#Ñ#Ð$9Ó:€ô�g—o‘oô ð ×Ñò(ó ñ(r   