ó
    Ãu„j£  ã                   óB   • S r SSKrSSKJrJr  SSKJr   " S S\5      rg)zñ
A Textual Logging handler.

If there is an active Textual app, then log messages will go via the app (and logged via textual console).

If there is *no* active app, then log messages will go to stderr or stdout, depending on configuration.
é    N)ÚHandlerÚ	LogRecord)Ú
active_appc                   óR   ^ • \ rS rSrSrSS\S\SS4U 4S jjjrS\SS4S	 jrS
r	U =r
$ )ÚTextualHandleré   z#A Logging handler for Textual apps.ÚstderrÚstdoutÚreturnNc                 ó:   >• [         TU ]  5         Xl        X l        g)z›Initialize a Textual logging handler.

Args:
    stderr: Log to stderr when there is no active app.
    stdout: Log to stdout when there is no active app.
N)ÚsuperÚ__init__Ú_stderrÚ_stdout)Úselfr	   r
   Ú	__class__s      €Ú�C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\textual/logging.pyr   ÚTextualHandler.__init__   s   ø€ ô 	‰ÑÔØŒØ�ó    Úrecordc                 óT  • U R                  U5      n [        R                  " 5       nUR                  R	                  U5        g! [
         aY    U R                  (       a  [        U[        R                  S9   gU R                  (       a  [        U[        R                  S9   g gf = f)zInvoked by logging.)ÚfileN)Úformatr   ÚgetÚlogÚloggingÚLookupErrorr   ÚprintÚsysr	   r   r
   )r   r   ÚmessageÚapps       r   ÚemitÚTextualHandler.emit   ss   € à—+‘+˜fÓ%ˆð	%Ü—.’.Ó"ˆCð �G‰G�O‰O˜GÕ$øô ó 	0Ø�|�|Ü�g¤C§J¡JÔ/Ø——Ü�g¤C§J¡JÔ/ñ ð	0ús   “A Á3B'Á9)B'Â&B')r   r   )TF)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úboolr   r   r"   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      s=   ø† Ù-ñ	˜tð 	°Dð 	ÀT÷ 	ð 	ð%˜9ð %¨÷ %ò %r   r   )r(   r   r   r   r   Útextual._contextr   r   © r   r   Ú<module>r.      s!   ðñó ß &å 'ô%�Wõ %r   