ó
    Ð]jŸ!  ã                  ó0  • % S r SSKJr  SSKrSSKrSSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  \(       a  Sr\(       a  SOSrOSrSr\" SSS9r\S\\S   4   r\R.                  " S5      r\R2                  \R4                  :X  a  \R7                  \R8                  5        S"S jr\" 5       rS\ S'   S#S jr!S$S jr"\\RF                  S4   r$ " S S5      r% " S S5      r& S%     S&S jjr' " S  S!5      r(g)'a”  Logging control and utilities.

Control of logging for SA can be performed from the regular python logging
module.  The regular dotted module namespace is used, starting at
'sqlalchemy'.  For class-level logging, the class name is appended.

The "echo" keyword parameter, available on SQLA :class:`_engine.Engine`
and :class:`_pool.Pool` objects, corresponds to a logger specific to that
instance only.

é    )ÚannotationsN)ÚAny)ÚOptional)Úoverload)ÚSet)ÚType)ÚTypeVar)ÚUnioné   )Úpy311)Úpy38)ÚLiteralTé   FÚ_ITÚ
Identified)ÚboundÚdebugÚ
sqlalchemyc                ó¸   • [         R                  " [        R                  5      nUR	                  [         R
                  " S5      5        U R                  U5        g )Nz.%(asctime)s %(levelname)s %(name)s %(message)s)ÚloggingÚStreamHandlerÚsysÚstdoutÚsetFormatterÚ	FormatterÚ
addHandler)ÚloggerÚhandlers     ÚK/home/mande/repo/quber/.venv/lib/python3.13/site-packages/sqlalchemy/log.pyÚ_add_default_handlerr    :   sC   € Ü×#Ò#¤C§J¡JÓ/€GØ×ÑÜ×ÒÐJÓKôð ×Ñ�gÕó    zSet[Type[Identified]]Ú_logged_classesc                ób   • [        U SS 5      =(       d    U R                  S-   U R                  -   $ )NÚ_sqla_logger_namespaceÚ.)ÚgetattrÚ
__module__Ú__name__)Úclss    r   Ú_qual_logger_name_for_clsr*   E   s.   € ä�Ð-¨tÓ4÷ 	/Ø�>‰>˜CÑ #§,¡,Ñ.ðr!   c                óª   ^• [         R                  " [        U 5      5      mU4S jU l        U4S jU l        TU l        [        R                  U 5        U $ )Nc                óB   >• TR                  [        R                  5      $ ©N)ÚisEnabledForr   ÚDEBUG©Úselfr   s    €r   Ú<lambda>Úclass_logger.<locals>.<lambda>N   s   ø€ ¨×)<Ñ)<Ü�‰ô*r!   c                óB   >• TR                  [        R                  5      $ r-   )r.   r   ÚINFOr0   s    €r   r2   r3   Q   s   ø€ ¨×(;Ñ(;Ü�‰ô)r!   )r   Ú	getLoggerr*   Ú_should_log_debugÚ_should_log_infor   r"   Úadd)r)   r   s    @r   Úclass_loggerr:   L   sI   ø€ Ü×ÒÔ8¸Ó=Ó>€Fô€CÔô€CÔð €C„JÜ×Ñ˜ÔØ€Jr!   ÚInstanceLoggerc                  óP   • \ rS rSr% SrSrS\S'   S\S'   S\S	'   SS
 jrSS jrSr	g)r   é\   © NzOptional[str]Úlogging_nameÚ_IdentifiedLoggerTyper   Ú_EchoFlagTypeÚ_echoc                óT   • U R                   R                  [        R                  5      $ r-   )r   r.   r   r/   ©r1   s    r   r7   ÚIdentified._should_log_debuge   s   € Ø�{‰{×'Ñ'¬¯©Ó6Ð6r!   c                óT   • U R                   R                  [        R                  5      $ r-   )r   r.   r   r5   rD   s    r   r8   ÚIdentified._should_log_infoh   s   € Ø�{‰{×'Ñ'¬¯©Ó5Ð5r!   )ÚreturnÚbool)
r(   r'   Ú__qualname__Ú__firstlineno__Ú	__slots__r?   Ú__annotations__r7   r8   Ú__static_attributes__r>   r!   r   r   r   \   s'   ‡ Ø€Ià"&€L�-Ó&à!Ó!àÓô7÷6r!   c                  óî   • \ rS rSr% Sr\R                  \R                  \R                  \R                  S.r	S\
S'   SrSS jrSS jrSS	 jrSS
 jr\rSS jrSS jrSS jrSS jrSS jrSS jrSrg)r;   él   aç  A logger adapter (wrapper) for :class:`.Identified` subclasses.

This allows multiple instances (e.g. Engine or Pool instances)
to share a logger, but have its verbosity controlled on a
per-instance basis.

The basic functionality is to return a logging level
which is based on an instance's echo setting.

Default implementation is:

'debug' -> logging.DEBUG
True    -> logging.INFO
False   -> Effective level of underlying logger (
logging.WARNING by default)
None    -> same as False
)NFTr   rA   rB   )Úechor   c                óì   • Xl         [        R                  " U5      U l        U R                  U   [        R
                  ::  a2  U R                  R                  (       d  [        U R                  5        g g g r-   )rQ   r   r6   r   Ú	_echo_mapr5   Úhandlersr    )r1   rQ   Únames      r   Ú__init__ÚInstanceLogger.__init__‹   sQ   € ØŒ	Ü×'Ò'¨Ó-ˆŒð �>‰>˜$Ñ¤7§<¡<Ó/¸¿¹×8L×8LÜ  §¡Õ-ð 9MÐ/r!   c                óN   • U R                   " [        R                  U/UQ70 UD6  g)z/Delegate a debug call to the underlying logger.N)Úlogr   r/   ©r1   ÚmsgÚargsÚkwargss       r   r   ÚInstanceLogger.debug—   s    € ð 	�Š”—‘ Ð5 dÒ5¨fÓ5r!   c                óN   • U R                   " [        R                  U/UQ70 UD6  g)z/Delegate an info call to the underlying logger.N)rY   r   r5   rZ   s       r   ÚinfoÚInstanceLogger.infoœ   s    € ð 	�Š”—‘˜sÐ4 TÒ4¨VÓ4r!   c                óN   • U R                   " [        R                  U/UQ70 UD6  g)z1Delegate a warning call to the underlying logger.N)rY   r   ÚWARNINGrZ   s       r   ÚwarningÚInstanceLogger.warning¡   s    € ð 	�Š”—‘ #Ð7¨Ò7°Ó7r!   c                óN   • U R                   " [        R                  U/UQ70 UD6  g)z2
Delegate an error call to the underlying logger.
N©rY   r   ÚERRORrZ   s       r   ÚerrorÚInstanceLogger.error¨   s    € ð 	�Š”—‘ Ð5 dÒ5¨fÓ5r!   c                óX   • SUS'   U R                   " [        R                  U/UQ70 UD6  g)z4Delegate an exception call to the underlying logger.r   Úexc_infoNrg   rZ   s       r   Ú	exceptionÚInstanceLogger.exception®   s*   € ð ˆˆzÑØ�Š”—‘ Ð5 dÒ5¨fÓ5r!   c                óN   • U R                   " [        R                  U/UQ70 UD6  g)z2Delegate a critical call to the underlying logger.N)rY   r   ÚCRITICALrZ   s       r   ÚcriticalÚInstanceLogger.critical´   s"   € ð 	�Š”×!Ñ! 3Ð8¨Ò8°Ó8r!   c                ór  • U R                   R                  R                  U:¼  a  gU R                  U R                     nU[
        R                  :X  a  U R                   R                  5       nX:¼  aF  [        (       a  UR                  SS5      [        -   US'   U R                   R                  " XU40 UD6  gg)z®Delegate a log call to the underlying logger.

The level here is determined by the echo
flag as well as that of the underlying logger, and
logger._log() is called directly.

NÚ
stacklevelr   )r   ÚmanagerÚdisablerS   rQ   r   ÚNOTSETÚgetEffectiveLevelÚ
STACKLEVELÚgetÚSTACKLEVEL_OFFSETÚ_log)r1   Úlevelr[   r\   r]   Úselected_levels         r   rY   ÚInstanceLogger.log¹   s˜   € ð �;‰;×Ñ×&Ñ&¨%Ó/ØàŸ™¨¯	©	Ñ2ˆØœWŸ^™^Ó+Ø!Ÿ[™[×:Ñ:Ó<ˆNàÓ"ßŠzà—J‘J˜|¨QÓ/Ô2CÑCð �|Ñ$ð �K‰K×Ò˜U¨Ñ8°Ó8ð #r!   c                óp   • U R                   R                  R                  U:¼  a  gXR                  5       :¬  $ )z)Is this logger enabled for level 'level'?F)r   ru   rv   rx   ©r1   r}   s     r   r.   ÚInstanceLogger.isEnabledForÔ   s1   € ð �;‰;×Ñ×&Ñ&¨%Ó/ØØ×.Ñ.Ó0Ñ0Ð0r!   c                ó”   • U R                   U R                     nU[        R                  :X  a  U R                  R                  5       nU$ )z+What's the effective level for this logger?)rS   rQ   r   rw   r   rx   r�   s     r   rx   Ú InstanceLogger.getEffectiveLevelÛ   s9   € ð —‘˜tŸy™yÑ)ˆØ”G—N‘NÓ"Ø—K‘K×1Ñ1Ó3ˆEØˆr!   N)rQ   rA   rU   Ústr)r[   r…   r\   r   r]   r   rH   ÚNone)
r}   Úintr[   r…   r\   r   r]   r   rH   r†   )r}   r‡   rH   rI   )rH   r‡   )r(   r'   rJ   rK   Ú__doc__r   rw   r5   r/   rS   rM   rL   rV   r   r`   rd   Úwarnri   rm   rq   rY   r.   rx   rN   r>   r!   r   r;   r;   l   sr   ‡ ñð( �n‰nØ�~‰~Ø�l‰lØ—‘ñ	€Ið Óà"€Iô.ô6ô
5ô
8ð
 €Dô6ô6ô9ô
9ô61÷r!   c                ó  • U R                   (       a'  [        U R                  5      < SU R                   < 3nO[        U R                  5      nXl        US;   a  [        R
                  " U5      nO[        X5      nX0l        g)zEcreate a logger for an instance that implements :class:`.Identified`.r%   )FNN)r?   r*   Ú	__class__rB   r   r6   r;   r   )ÚinstanceÚechoflagrU   r   s       r   Úinstance_loggerrŽ   ä   so   € ð
 ××ä% h×&8Ñ&8Ö9Ø×!Ó!ð
‰ô
 )¨×);Ñ);Ó<ˆà„Nð �=Ó ô ×"Ò" 4Ó(‰ô
   Ó/ˆà…Or!   c                  óx   • \ rS rSrSr\      S	S j5       r\      S
S j5       r      SS jrSS jrSrg)Úecho_propertyi  a}      When ``True``, enable log output for this element.

    This has the effect of setting the Python logging level for the namespace
    of this element's class and object reference.  A value of boolean ``True``
    indicates that the loglevel ``logging.INFO`` will be set for the logger,
    whereas the string value ``debug`` will set the loglevel to
    ``logging.DEBUG``.
    c                ó   • g r-   r>   ©r1   rŒ   Úowners      r   Ú__get__Úecho_property.__get__  ó   € ð r!   c                ó   • g r-   r>   r’   s      r   r”   r•     r–   r!   c                ó$   • Uc  U $ UR                   $ r-   )rB   r’   s      r   r”   r•     s   € ð ÑØˆKà—>‘>Ð!r!   c                ó   • [        XS9  g )N)r�   )rŽ   )r1   rŒ   Úvalues      r   Ú__set__Úecho_property.__set__  s
   € Ü˜Ó1r!   r>   N)rŒ   zLiteral[None]r“   úType[Identified]rH   r�   )rŒ   r   r“   r�   rH   rA   )rŒ   zOptional[Identified]r“   r�   rH   z#Union[echo_property, _EchoFlagType])rŒ   r   rš   rA   rH   r†   )	r(   r'   rJ   rK   rˆ   r   r”   r›   rN   r>   r!   r   r�   r�     sƒ   † ð€Gð ðØ%ðØ.>ðà	óó ðð ðØ"ðØ+;ðà	óó ðð"Ø,ð"Ø5Eð"à	,ô"÷2r!   r�   )r   zlogging.LoggerrH   r†   )r)   r�   rH   r…   )r)   ú	Type[_IT]rH   rž   r-   )rŒ   r   r�   rA   rH   r†   ))rˆ   Ú
__future__r   r   r   Útypingr   r   r   r   r   r	   r
   Úutilr   r   Úutil.typingr   ry   r{   r   rI   rA   r6   Ú
rootloggerr}   rw   ÚsetLevelÚWARNr    Úsetr"   rM   r*   r:   ÚLoggerr@   r   r;   rŽ   r�   r>   r!   r   Ú<module>r¨      s$  ðò
õ #ã Û 
Ý Ý Ý Ý Ý Ý Ý å Ý Ý  ö Ø€Jö #™¨Ñà€JØÐáˆe˜<Ñ(€à�d˜D '¨'Ñ"2Ð2Ñ3€ð
 ×Ò˜|Ó,€
Ø×Ñ�w—~‘~Ó%Ø×Ñ˜Ÿ™Ô%ôñ *-«€Ð&Ó .ôô
ð ˜gŸn™nÐ.>Ð>Ñ?Ð ÷6ñ 6÷ uñ uðr 59ðØðØ$1ðà	õ÷<2ò 2r!   