Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
logging.cpython-313.pyc33 linesDownload Raw Back to __pycache__
1�

2��jI	����SSKJr SSKrSSKrSSKrSSKJr SSKJ	r	 \R(aSSKJr \SSj5r
SSjr\R"\
5r\R#\R$"S	55 S
S3jrg)�)�annotationsN)�4LocalProxy�)�request)�Appc�^�[(a[RS$[R$)a}Find the most appropriate error stream for the application. If a request5is active, log to ``wsgi.errors``, otherwise use ``sys.stderr``.6 7If you configure your own :class:`logging.StreamHandler`, you may want to8use this for the stream. If you are using file or dict configuration and9can't import this directly, you can refer to it as10``ext://flask.logging.wsgi_errors_stream``.11zwsgi.errors)r�environ�sys�stderr���SD:\code\apps\devtools\python\user_packages\Python313\site-packages\flask/logging.py�wsgi_errors_streamrs"���w����}�-�-��:�:�r
c��^�UR5mUnU(aM[U4SjUR55(agUR(dgURnU(aMMg)z�Check if there is a handler in the logging chain that will handle the12given logger's :meth:`effective level <~logging.Logger.getEffectiveLevel>`.13c3�@># �UHoRT:*v� M g7f)N)�level)�.0�handlerrs  �r�	<genexpr>�$has_level_handler.<locals>.<genexpr>'s����F�5E�'�}�}��%�5E�s�TF)�getEffectiveLevel�any�handlers�	propagate�parent)�logger�currentrs  @r�has_level_handlerrs]���
�$�$�&�E��G�14��F�W�5E�5E�F�F�F��� � ����.�.���'�r
z6[%(asctime)s] %(levelname)s in %(module)s: %(message)sc��[R"UR5nUR(a0UR(dUR[R5 [U5(dUR[5 U$)a�Get the Flask app's logger and configure it if needed.15 16The logger name will be the same as17:attr:`app.import_name <flask.Flask.name>`.18 19When :attr:`~flask.Flask.debug` is enabled, set the logger level to20:data:`logging.DEBUG` if it is not set.21 22If there is no handler for the logger's effective level, add a23:class:`~logging.StreamHandler` for24:func:`~flask.logging.wsgi_errors_stream` with a basic format.25)26�logging�	getLogger�name�debugr�setLevel�DEBUGr�27addHandler�default_handler)�apprs  r�
create_loggerr):sS���
�
�s�x�x�
(�F�28�y�y��������
�
�&��V�$�$����/�*��Mr
)�returnzt.TextIO)r�logging.Loggerr*�bool)r(rr*r+)�29__future__rr r30�typing�t�werkzeug.localr�globalsr�
TYPE_CHECKING�31sansio.apprrr�
StreamHandlerr'�setFormatter�	Formatterr)rr
r�<module>r7so��"��32��%���?�?�������*�'�'�(:�;��������N�O��33r
codekingpro/portable-devtools · Team Ai