Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
log.cpython-313.pyc79 linesDownload Raw Back to __pycache__
1�

2��j�"��0�%SrSSKJr SSKrSSKrSSKJr SSKJr SSKJr SSKJ	r	 SSKJ3r4 SS	KJr SS5KJr SSK
Jr SS
K
Jr SSKJr \(aSr\(aSOSrOSrSr\"SSS9r\S\\S4r\R."S5r\R2\R4:Xa\R7\R85 S"Sjr\"5rS\ S'S#Sjr!S$Sjr"\\RFS4r$"SS5r%"SS5r&S%S&Sjjr'"S S!5r(g)'a�Logging control and utilities.6 7Control of logging for SA can be performed from the regular python logging8module.  The regular dotted module namespace is used, starting at9'sqlalchemy'.  For class-level logging, the class name is appended.10 11The "echo" keyword parameter, available on SQLA :class:`_engine.Engine`12and :class:`_pool.Pool` objects, corresponds to a logger specific to that13instance only.14 15�)�annotationsN)�Any)�Optional)�overload)�Set)�Type)�TypeVar)�Union�)�py311)�py38)�LiteralT�F�_IT�16Identified)�bound�debug�17sqlalchemyc��[R"[R5nUR	[R18"S55 UR
U5 g)Nz.%(asctime)s %(levelname)s %(name)s %(message)s)�logging�
StreamHandler�sys�stdout�setFormatter�	Formatter�19addHandler)�logger�handlers  �TD:\code\apps\devtools\python\user_packages\Python313\site-packages\sqlalchemy/log.py�_add_default_handlerr :sC���#�#�C�J�J�/�G�������J�K�����g��zSet[Type[Identified]]�_logged_classesc�b�[USS5=(d URS-UR-$)N�_sqla_logger_namespace�.)�getattr�20__module__�__name__)�clss r�_qual_logger_name_for_clsr*Es.����-�t�4�	/��>�>�C��#�,�,�.�r!c�^�[R"[U55mU4SjUlU4SjUlTUl[RU5 U$)Nc�B>�TR[R5$�N)�isEnabledForr�DEBUG��selfrs �r�<lambda>�class_logger.<locals>.<lambda>Ns����)<�)<��
�
�*r!c�B>�TR[R5$r-)r.r�INFOr0s �rr2r3Qs����(;�(;����)r!)r�	getLoggerr*�_should_log_debug�_should_log_inforr"�add)r)rs @r�class_loggerr:LsI���
�
�
�8��=�
>�F��C���C���C�J�������Jr!�InstanceLoggerc�P�\rSrSr%SrSrS\S'S\S'S\S	'SS21jrSSjrSr	g)
r�\�Nz
Optional[str]�logging_name�_IdentifiedLoggerTyper�
_EchoFlagType�_echoc�T�URR[R5$r-)rr.rr/�r1s rr7�Identified._should_log_debuges���{�{�'�'��
�
�6�6r!c�T�URR[R5$r-)rr.rr5rDs rr8�Identified._should_log_infohs���{�{�'�'����5�5r!)�return�bool)22r(r'�__qualname__�__firstlineno__�	__slots__r?�__annotations__r7r8�__static_attributes__r>r!rrr\s'���I�"&�L�-�&�!�!���7�6r!c���\rSrSr%Sr\R\R\R\RS.r	S\23S'SrSSjrSSjr
SS	jrSS24jr\rSSjrSSjrSS
jrSSjrSSjrSSjrSrg)r;�la�A logger adapter (wrapper) for :class:`.Identified` subclasses.25 26This allows multiple instances (e.g. Engine or Pool instances)27to share a logger, but have its verbosity controlled on a28per-instance basis.29 30The basic functionality is to return a logging level31which is based on an instance's echo setting.32 33Default implementation is:34 35'debug' -> logging.DEBUG36True    -> logging.INFO37False   -> Effective level of underlying logger (38logging.WARNING by default)39None    -> same as False40)NFTrrArB)�echorc���Xl[R"U5UlURU[R41::a2URR(d[UR5 gggr-)rQrr6r�	_echo_mapr5�handlersr )r1rQ�names   r�__init__�InstanceLogger.__init__�sQ���	��'�'��-����>�>�$��7�<�<�/����8L�8L� ����-�9M�/r!c�N�UR"[RU/UQ70UD6 g)z/Delegate a debug call to the underlying logger.N)�logrr/�r1�msg�args�kwargss    rr�InstanceLogger.debug�s ��	
�������5�d�5�f�5r!c�N�UR"[RU/UQ70UD6 g)z/Delegate an info call to the underlying logger.N)rYrr5rZs    r�info�InstanceLogger.info�s ��	
������s�4�T�4�V�4r!c�N�UR"[RU/UQ70UD6 g)z1Delegate a warning call to the underlying logger.N)rYr�WARNINGrZs    r�warning�InstanceLogger.warning�s ��	
������#�7��7��7r!c�N�UR"[RU/UQ70UD6 g)z242Delegate an error call to the underlying logger.43N�rYr�ERRORrZs    r�error�InstanceLogger.error�s ��	
�������5�d�5�f�5r!c�X�SUS'UR"[RU/UQ70UD6 g)z4Delegate an exception call to the underlying logger.r�exc_infoNrgrZs    r�	exception�InstanceLogger.exception�s*����z���������5�d�5�f�5r!c�N�UR"[RU/UQ70UD6 g)z2Delegate a critical call to the underlying logger.N)rYr�CRITICALrZs    r�critical�InstanceLogger.critical�s"��	
����!�!�3�8��8��8r!c�r�URRRU:�agURURnU[44R:XaURR5nX:�aF[(aURSS5[-US'URR"XU40UD6 gg)z�Delegate a log call to the underlying logger.45 46The level here is determined by the echo47flag as well as that of the underlying logger, and48logger._log() is called directly.49 50N�51stacklevelr)r�manager�disablerSrQr�NOTSET�getEffectiveLevel�52STACKLEVEL�get�STACKLEVEL_OFFSET�_log)r1�levelr[r\r]�selected_levels      rrY�InstanceLogger.log�s����;�;���&�&�%�/������	�	�2���W�^�^�+�!�[�[�:�:�<�N��"��z��J�J�|�Q�/�2C�C��|�$�
�K�K���U��8��8�
#r!c�p�URRRU:�agXR5:�$)z)Is this logger enabled for level 'level'?F)rrurvrx�r1r}s  rr.�InstanceLogger.isEnabledFor�s1���;�;���&�&�%�/���.�.�0�0�0r!c��URURnU[R:XaURR5nU$)z+What's the effective level for this logger?)rSrQrrwrrxr�s  rrx� InstanceLogger.getEffectiveLevel�s9�����t�y�y�)���G�N�N�"��K�K�1�1�3�E��r!N)rQrArU�str)r[r�r\rr]rrH�None)53r}�intr[r�r\rr]rrHr�)r}r�rHrI)rHr�)r(r'rJrK�__doc__rrwr5r/rSrMrLrVrr`rd�warnrirmrqrYr.rxrNr>r!rr;r;lsr���(�n�n��~�~��l�l����	�I���"�I�.�6�545�558�56�D�6�6�9�579�61�r!c��UR(a'[UR5<SUR<3nO[UR5nXlUS;a[R58"U5nO[
X5nX0lg)zEcreate a logger for an instance that implements :class:`.Identified`.r%)FNN)r?r*�	__class__rBrr6r;r)�instance�echoflagrUrs    r�instance_loggerr��so��59���%�h�&8�&8�9��!�!�60��61)��);�);�<���N��=� ��"�"�4�(��62 ��/���Or!c�x�\rSrSrSr\S	Sj5r\S63Sj5rSSjrSSjrSrg)
�
echo_propertyia}    When ``True``, enable log output for this element.64 65    This has the effect of setting the Python logging level for the namespace66    of this element's class and object reference.  A value of boolean ``True``67    indicates that the loglevel ``logging.INFO`` will be set for the logger,68    whereas the string value ``debug`` will set the loglevel to69    ``logging.DEBUG``.70    c��gr-r>�r1r��owners   r�__get__�echo_property.__get__
���r!c��gr-r>r�s   rr�r�r�r!c�$�UcU$UR$r-)rBr�s   rr�r�s�����K��>�>�!r!c��[XS9 g)N)r�)r�)r1r��values   r�__set__�echo_property.__set__s71����1r!r>N)r�z
Literal[None]r��Type[Identified]rHr�)r�rr�r�rHrA)r�zOptional[Identified]r�r�rHz#Union[echo_property, _EchoFlagType])r�rr�rArHr�)	r(r'rJrKr�rr�r�rNr>r!rr�r�s����G���%��.>��	������"��+;��	����"�,�"�5E�"�	,�"�2r!r�)rzlogging.LoggerrHr�)r)r�rHr�)r)�	Type[_IT]rHr�r-)r�rr�rArHr�))r��72__future__rrr�typingrrrrrr	r73�utilrr
�util.typingrryr{rrIrAr6�74rootloggerr}rw�setLevel�WARNr �setr"rMr*r:�Loggerr@rr;r�r�r>r!r�<module>r�s$��75�#��76���������� ���J�#�����J���
�e�<�(���d�D�'�'�"2�2�3�
�77�
�
�|�
,�78�
���w�~�~�%�������%��*-���&�.��79��g�n�n�.>�>�?��
6�
6� u�u�r59����$1��	��<2�2r!
codekingpro/portable-devtools · Team Ai