
    0hI	                        S SK Jr  S SKrS SKrS SKrS SKJr  SSKJ	r	  \R                  (       a  SSKJr  \SS j5       rSS jr\R                  " \5      r\R#                  \R$                  " S	5      5        SS
 jrg)    )annotationsN)
LocalProxy   )request)Appc                 ^    [         (       a  [         R                  S   $ [        R                  $ )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``.
zwsgi.errors)r   environsysstderr     E/var/www/auris/envauris/lib/python3.13/site-packages/flask/logging.pywsgi_errors_streamr      s"     w}--::r   c                   ^ U R                  5       mU nU(       aM  [        U4S jUR                   5       5      (       a  gUR                  (       d   gUR                  nU(       a  MM  g)zCheck if there is a handler in the logging chain that will handle the
given logger's :meth:`effective level <~logging.Logger.getEffectiveLevel>`.
c              3  @   >#    U  H  oR                   T:*  v   M     g 7f)N)level).0handlerr   s     r   	<genexpr>$has_level_handler.<locals>.<genexpr>'   s     F5E'}}%5Es   TF)getEffectiveLevelanyhandlers	propagateparent)loggercurrentr   s     @r   has_level_handlerr      s]     $$&EG
FW5E5EFFF    .. ' r   z6[%(asctime)s] %(levelname)s in %(module)s: %(message)sc                   [         R                  " U R                  5      nU R                  (       a0  UR                  (       d  UR                  [         R                  5        [        U5      (       d  UR                  [        5        U$ )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)appr   s     r   create_loggerr)   :   sS     sxx(F
yy&V$$/*Mr   )returnzt.TextIO)r   logging.Loggerr*   bool)r(   r   r*   r+   )
__future__r   r    r
   typingtwerkzeug.localr   globalsr   TYPE_CHECKING
sansio.appr   r   r   StreamHandlerr'   setFormatter	Formatterr)   r   r   r   <module>r7      so    "  
  % ??  * ''(:;   NO
r   