HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/flask/__pycache__/logging.cpython-310.pyc
o

'we	�@s�ddlmZddlZddlZddlZddlmZddlm	Z	ej
r'ddlmZedd	d
��Z
ddd�Ze�e
�Ze�e�d��ddd�ZdS)�)�annotationsN)�
LocalProxy�)�request)�Flask�return�t.TextIOcCstrtjdStjS)a�Find the most appropriate error stream for the application. If a request
    is active, log to ``wsgi.errors``, otherwise use ``sys.stderr``.

    If you configure your own :class:`logging.StreamHandler`, you may want to
    use this for the stream. If you are using file or dict configuration and
    can't import this directly, you can refer to it as
    ``ext://flask.logging.wsgi_errors_stream``.
    zwsgi.errors)r�environ�sys�stderr�rr�F/home/arjun/projects/env/lib/python3.10/site-packages/flask/logging.py�wsgi_errors_streams
r�logger�logging.Logger�boolcsF|���|}|r!t�fdd�|jD��rdS|js	dS|j}|sdS)z�Check if there is a handler in the logging chain that will handle the
    given logger's :meth:`effective level <~logging.Logger.getEffectiveLevel>`.
    c3s�|]}|j�kVqdS)N��level)�.0�handlerrrr
�	<genexpr>$s�z$has_level_handler.<locals>.<genexpr>TF)�getEffectiveLevel�any�handlers�	propagate�parent)r�currentrrr
�has_level_handlers��	rz6[%(asctime)s] %(levelname)s in %(module)s: %(message)s�apprcCs:t�|j�}|jr|js|�tj�t|�s|�t	�|S)a�Get the Flask app's logger and configure it if needed.

    The logger name will be the same as
    :attr:`app.import_name <flask.Flask.name>`.

    When :attr:`~flask.Flask.debug` is enabled, set the logger level to
    :data:`logging.DEBUG` if it is not set.

    If there is no handler for the logger's effective level, add a
    :class:`~logging.StreamHandler` for
    :func:`~flask.logging.wsgi_errors_stream` with a basic format.
    )
�logging�	getLogger�name�debugr�setLevel�DEBUGr�
addHandler�default_handler)rrrrr
�
create_logger7s

r')rr)rrrr)rrrr)�
__future__rrr
�typing�t�werkzeug.localr�globalsr�
TYPE_CHECKINGrrrr�
StreamHandlerr&�setFormatter�	Formatterr'rrrr
�<module>s 

�