Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/__pycache__/log.cpython-312.pyc
�

���g�!���UdZddlmZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lmZddl
mZdd
l
mZddlmZer	dZerdndZndZdZedd��ZedeedfZej.d�Zej2ej4k(rej7ej8�d"d�Ze�Zde d<d#d�Z!d$d�Z"eejFdfZ$Gd�d�Z%Gd�d�Z&	d%					d&d�Z'Gd �d!�Z(y)'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��tjtj�}|j	tj
d��|j
|�y)Nz.%(asctime)s %(levelname)s %(name)s %(message)s)�logging�
StreamHandler�sys�stdout�setFormatter�	Formatter�
addHandler)�logger�handlers  �?/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/log.py�_add_default_handlerr :sC���#�#�C�J�J�/�G�������J�K�����g��zSet[Type[Identified]]�_logged_classesc�X�t|dd�xs|jdz|jzS)N�_sqla_logger_namespace�.)�getattr�
__module__�__name__)�clss r�_qual_logger_name_for_clsr*Es.����-�t�4�	/��>�>�C��#�,�,�.�r!c���tjt|����fd�|_�fd�|_�|_tj|�|S)Nc�B���jtj�S�N)�isEnabledForr�DEBUG��selfrs �r�<lambda>zclass_logger.<locals>.<lambda>Ns����)<�)<��
�
�*r!c�B���jtj�Sr-)r.r�INFOr0s �rr2zclass_logger.<locals>.<lambda>Qs����(;�(;����)r!)r�	getLoggerr*�_should_log_debug�_should_log_inforr"�add)r)rs @r�class_loggerr9LsI���
�
�
�8��=�
>�F��C���C���C�J�������Jr!�InstanceLoggerc�D�eZdZUdZdZded<ded<ded<dd	�Zdd
�Zy)r�Nz
Optional[str]�logging_name�_IdentifiedLoggerTyper�
_EchoFlagType�_echoc�T�|jjtj�Sr-)rr.rr/�r1s rr6zIdentified._should_log_debuges���{�{�'�'��
�
�6�6r!c�T�|jjtj�Sr-)rr.rr4rBs rr7zIdentified._should_log_infohs���{�{�'�'����5�5r!)�return�bool)r(r'�__qualname__�	__slots__r=�__annotations__r6r7r<r!rrr\s'���I�"&�L�-�&�!�!���7�6r!c���eZdZUdZej
ej
ejejd�Zde	d<dZ
dd�Zdd�Zdd�Z
dd	�ZeZdd
�Zdd�Zdd�Zdd
�Zdd�Zdd�Zy)r:aA 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
    )NFTrr?r@)�echorc���||_tj|�|_|j|tj
kr-|jjst|j�yyyr-)rJrr5r�	_echo_mapr4�handlersr )r1rJ�names   r�__init__zInstanceLogger.__init__�sS����	��'�'��-����>�>�$��7�<�<�/����8L�8L� ����-�9M�/r!c�N�|jtj|g|��i|��y)z/Delegate a debug call to the underlying logger.N)�logrr/�r1�msg�args�kwargss    rrzInstanceLogger.debug�s"��	��������5�d�5�f�5r!c�N�|jtj|g|��i|��y)z/Delegate an info call to the underlying logger.N)rQrr4rRs    r�infozInstanceLogger.info�s"��	�������s�4�T�4�V�4r!c�N�|jtj|g|��i|��y)z1Delegate a warning call to the underlying logger.N)rQr�WARNINGrRs    r�warningzInstanceLogger.warning�s"��	�������#�7��7��7r!c�N�|jtj|g|��i|��y)zB
        Delegate an error call to the underlying logger.
        N�rQr�ERRORrRs    r�errorzInstanceLogger.error�s"��	��������5�d�5�f�5r!c�X�d|d<|jtj|g|��i|��y)z4Delegate an exception call to the underlying logger.r�exc_infoNr\rRs    r�	exceptionzInstanceLogger.exception�s,����z����������5�d�5�f�5r!c�N�|jtj|g|��i|��y)z2Delegate a critical call to the underlying logger.N)rQr�CRITICALrRs    r�criticalzInstanceLogger.critical�s$��	�����!�!�3�8��8��8r!c�f�|jjj|k\ry|j|j}|t
jk(r|jj�}||k\rBtr|jdd�tz|d<|jj|||fi|��yy)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�disablerLrJr�NOTSET�getEffectiveLevel�
STACKLEVEL�get�STACKLEVEL_OFFSET�_log)r1�levelrSrTrU�selected_levels      rrQzInstanceLogger.log�s����;�;���&�&�%�/������	�	�2���W�^�^�+�!�[�[�:�:�<�N��N�"���J�J�|�Q�/�2C�C��|�$�
�D�K�K���U�C��8��8�
#r!c�p�|jjj|k\ry||j�k\S)z)Is this logger enabled for level 'level'?F)rrgrhrj�r1ros  rr.zInstanceLogger.isEnabledFor�s3���;�;���&�&�%�/����.�.�0�0�0r!c��|j|j}|tjk(r|jj�}|S)z+What's the effective level for this logger?)rLrJrrirrjrrs  rrjz InstanceLogger.getEffectiveLevel�s9�����t�y�y�)���G�N�N�"��K�K�1�1�3�E��r!N)rJr?rN�str)rSrtrTrrUrrD�None)
ro�intrSrtrTrrUrrDru)rorvrDrE)rDrv)r(r'rF�__doc__rrir4r/rLrHrGrOrrWrZ�warnr^rardrQr.rjr<r!rr:r:lsr���(�n�n��~�~��l�l����	�I���"�I�.�6�
5�
8�
�D�6�6�9�
9�61�r!c��|jr%t|j��d|j��}nt|j�}||_|dvrt	j
|�}||_yt
||�}||_y)zEcreate a logger for an instance that implements :class:`.Identified`.r%)FNN)r=r*�	__class__r@rr5r:r)�instance�echoflagrNrs    r�instance_loggerr}�s~��
���%�h�&8�&8�9��!�!�
��
)��);�);�<���H�N��=� ��"�"�4�(���H�O� ��$�/���H�Or!c�h�eZdZdZe						dd��Ze						dd��Z						d	d�Zd
d�Zy)�
echo_propertya}    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��yr-r<�r1r{�owners   r�__get__zecho_property.__get__
���r!c��yr-r<r�s   rr�zecho_property.__get__r�r!c�"�|�|S|jSr-)r@r�s   rr�zecho_property.__get__s�����K��>�>�!r!c��t||��y)N)r|)r})r1r{�values   r�__set__zecho_property.__set__s����5�1r!N)r{z
Literal[None]r��Type[Identified]rDr)r{rr�r�rDr?)r{zOptional[Identified]r�r�rDz#Union[echo_property, _EchoFlagType])r{rr�r?rDru)r(r'rFrwrr�r�r<r!rrrs����G���%��.>��	������"��+;��	����"�,�"�5E�"�	,�"�2r!r)rzlogging.LoggerrDru)r)r�rDrt)r)�	Type[_IT]rDr�r-)r{rr|r?rDru))rw�
__future__rrr�typingrrrrrr	r
�utilrr
�util.typingrrkrmrrEr?r5�
rootloggerrori�setLevel�WARNr �setr"rHr*r9�Loggerr>rr:r}rr<r!r�<module>r�s&��
�#��
���������� ���J�#�����J���
�e�<�(���d�D�'�'�"2�2�3�
�
�W�
�
�|�
,�
�
���w�~�~�%�������%��*-���&�.��
��g�n�n�.>�>�?��
6�
6� u�u�r59����$1��	��<2�2r!

ZeroDay Forums Mini