Ë
    èU.j,6  ã                  ó  — U d Z ddlmZ ddlZddlZddlZddlmZmZm	Z	m
Z
mZmZ ddlmZ ddlmZ ddlmZ dd	lmZmZmZ dd
lmZmZmZ ddlmZmZmZmZ 	 ee e«       e edd¬«       eej>                  jA                  dd«      dk(  xrd ej>                  jA                  dd«      dk7  xsC exr? ejB                  duxr/  e"ejB                  d«      xr ejB                  jG                  «       ¬«      gZ$de%d<    eee   e&«      Z' ed«      Z( e«       Z)dZ* G d„ d«      Z+ e+«       Z,	 d!d„Z-d"d„Z.d#d„Z/e/Z0	 	 	 	 	 	 d$	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d%d„Z1	 	 	 	 	 d$	 	 	 	 	 	 	 	 	 	 	 d&d„Z2	 	 	 	 	 d$	 	 	 	 	 	 	 	 	 	 	 d&d„Z3d'd„Z4 G d„ d «      Z5y)(zJ
Global state department.  Don't reload this module or everything breaks.
é    )ÚannotationsN)ÚAnyÚCallableÚIterableÚSequenceÚTypeÚcasté   )Úmake_filtering_bound_logger)ÚPrintLoggerFactory)Úmerge_contextvars)ÚConsoleRendererÚ_has_colorsÚset_exc_info)ÚStackInfoRendererÚTimeStamperÚadd_log_level)ÚBindableLoggerÚContextÚ	ProcessorÚWrappedLoggerz%Y-%m-%d %H:%M:%SF)ÚfmtÚutcÚNO_COLORÚ ÚFORCE_COLORÚisatty)ÚcolorszSequence[Processor]Ú_BUILTIN_DEFAULT_PROCESSORSc                  ól   — e Zd ZU dZdZded<   edd Zded<   eZ	ded	<   e
Zd
ed<   eZded<   eZded<   y)Ú_Configurationz
    Global defaults.
    FÚboolÚis_configuredNzIterable[Processor]Údefault_processorsztype[Context]Údefault_context_classr   Údefault_wrapper_classzCallable[..., WrappedLogger]Úlogger_factoryÚcache_logger_on_first_use)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r#   Ú__annotations__r   r$   Ú_BUILTIN_DEFAULT_CONTEXT_CLASSr%   Ú_BUILTIN_DEFAULT_WRAPPER_CLASSr&   Ú_BUILTIN_DEFAULT_LOGGER_FACTORYr'   Ú"_BUILTIN_CACHE_LOGGER_ON_FIRST_USEr(   © ó    úSC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\structlog/_config.pyr!   r!   9   sX   … ñð  €M�4ÓØ.IÉ!Ð.LÐÐ+ÓLØ+IÐ˜=ÓIØ!?Ð˜3Ó?à'ð Ð0ó ð 'IÐ˜tÔHr3   r!   c                 ó"   — t         j                  S )z•
    Return whether *structlog* has been configured.

    If `False`, *structlog* is running with builtin defaults.

    .. versionadded: 18.1.0
    )Ú_CONFIGr#   r2   r3   r4   r#   r#   N   s   € ô × Ñ Ð r3   c                 óž   — t         j                  t         j                  t         j                  t         j                  t         j
                  dœS )z®
    Get a dictionary with the current configuration.

    .. note::

       Changes to the returned dictionary do *not* affect *structlog*.

    .. versionadded: 18.1.0
    )Ú
processorsÚcontext_classÚwrapper_classr'   r(   )r6   r$   r%   r&   r'   r(   r2   r3   r4   Ú
get_configr;   Y   s;   € ô ×0Ñ0Ü ×6Ñ6Ü ×6Ñ6Ü!×0Ñ0Ü%,×%FÑ%Fñð r3   c                 ó   — t        dd| i|¤ŽS )ak  
    Convenience function that returns a logger according to configuration.

    >>> from structlog import get_logger
    >>> log = get_logger(y=23)
    >>> log.info("hello", x=42)
    y=23 x=42 event='hello'

    Args:
        args:
            *Optional* positional arguments that are passed unmodified to the
            logger factory.  Therefore it depends on the factory what they
            mean.

        initial_values: Values that are used to pre-populate your contexts.

    Returns:
        A proxy that creates a correctly configured bound logger when
        necessary. The type of that bound logger depends on your configuration
        and is `structlog.BoundLogger` by default.

    See `configuration` for details.

    If you prefer CamelCase, there's an alias for your reading pleasure:
    `structlog.getLogger`.

    .. versionadded:: 0.4.0 *args*
    Úlogger_factory_args©N)Úwrap_logger)ÚargsÚinitial_valuess     r4   Ú
get_loggerrB   l   s   € ô: ÑH°ÐH¸ÑHÐHr3   c           	     ó&   — t        | ||||||¬«      S )aC  
    Create a new bound logger for an arbitrary *logger*.

    Default values for *processors*, *wrapper_class*, and *context_class* can
    be set using `configure`.

    If you set an attribute here, `configure` calls have *no* effect for the
    *respective* attribute.

    In other words: selective overwriting of the defaults while keeping some
    *is* possible.

    Args:
        initial_values: Values that are used to pre-populate your contexts.

        logger_factory_args:
            Values that are passed unmodified as ``*logger_factory_args`` to
            the logger factory if not `None`.

    Returns:
        A proxy that creates a correctly configured bound logger when
        necessary.

    See `configure` for the meaning of the rest of the arguments.

    .. versionadded:: 0.4.0 *logger_factory_args*
    )r:   r8   r9   r(   rA   r=   )ÚBoundLoggerLazyProxy)Úloggerr8   r:   r9   r(   r=   rA   s          r4   r?   r?   •   s'   € ôH  ØØ#ØØ#Ø";Ø%Ø/ôð r3   c                óž   — dt         _        | �| t         _        |�|t         _        |�|t         _        |�|t         _        |�|t         _        yy)a  
    Configures the **global** defaults.

    They are used if `wrap_logger` or `get_logger` are called without
    arguments.

    Can be called several times, keeping an argument at `None` leaves it
    unchanged from the current setting.

    After calling for the first time, `is_configured` starts returning `True`.

    Use `reset_defaults` to undo your changes.

    Args:
        processors: The processor chain. See :doc:`processors` for details.

        wrapper_class:
            Class to use for wrapping loggers instead of
            `structlog.BoundLogger`.  See `standard-library`, :doc:`twisted`,
            and `custom-wrappers`.

        context_class:
            Class to be used for internal context keeping. The default is a
            `dict` and since dictionaries are ordered as of Python 3.6, there's
            few reasons to change this option.

        logger_factory:
            Factory to be called to create a new logger that shall be wrapped.

        cache_logger_on_first_use:
            `wrap_logger` doesn't return an actual wrapped logger but a proxy
            that assembles one when it's first used. If this option is set to
            `True`, this assembled logger is cached. See `performance`.

    .. versionadded:: 0.3.0 *cache_logger_on_first_use*
    TN)r6   r#   r$   r&   r%   r'   r(   ©r8   r:   r9   r'   r(   s        r4   Ú	configurerH   Ä   sX   € ðV !„GÔàÐØ%/ŒÔ"ØÐ Ø(5ŒÔ%ØÐ Ø(5ŒÔ%ØÐ!Ø!/ŒÔØ Ð,Ø,EŒÕ)ð -r3   c                ó~   — t         j                  st        | ||||¬«       yt        j                  dt
        d¬«       y)zê
    Configures if structlog isn't configured yet.

    It does *not* matter whether it was configured using `configure` or
    `configure_once` before.

    Raises:
        RuntimeWarning: if repeated configuration is attempted.
    rG   z!Repeated configuration attempted.é   )Ú
stacklevelN)r6   r#   rH   ÚwarningsÚwarnÚRuntimeWarningrG   s        r4   Úconfigure_oncerO   ý   s9   € ô  × Ò ÜØ!Ø'Ø'Ø)Ø&?ö	
ô 	�‰Ø/´ÈAö	
r3   c                 ó¶   — dt         _        t        dd t         _        t        t         _        t        t         _        t        t         _	        t        t         _        y)zu
    Resets global default values to builtin defaults.

    `is_configured` starts returning `False` afterwards.
    FN)r6   r#   r   r$   r/   r&   r.   r%   r0   r'   r1   r(   r2   r3   r4   Úreset_defaultsrQ     s9   € ð "„GÔÜ!<¹QÐ!?„GÔÜ$B„GÔ!Ü$B„GÔ!Ü<„GÔÜ(J„GÕ%r3   c                  ó–   — e Zd ZdZedd„«       Z	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zdd„Zdd„Zdd„Z	dd„Z
dd	„Zdd
„Zdd„Zdd„Zy)rD   a¼  
    Instantiates a bound logger on first usage.

    Takes both configuration and instantiation parameters into account.

    The only points where a bound logger changes state are ``bind()``,
    ``unbind()``, and ``new()`` and that return the actual ``BoundLogger``.

    If and only if configuration says so, that actual bound logger is cached on
    first usage.

    .. versionchanged:: 0.4.0 Added support for *logger_factory_args*.
    c                ó   — | j                   S r>   )Ú_initial_values©Úselfs    r4   Ú_contextzBoundLoggerLazyProxy._context9  s   € à×#Ñ#Ð#r3   Nc                óv   — || _         || _        || _        || _        || _        |xs i | _        |xs d| _        y )Nr2   )Ú_loggerÚ_wrapper_classÚ_processorsÚ_context_classÚ_cache_logger_on_first_userT   Ú_logger_factory_args)rV   rE   r:   r8   r9   r(   rA   r=   s           r4   Ú__init__zBoundLoggerLazyProxy.__init__=  sE   € ð ˆŒØ+ˆÔØ%ˆÔØ+ˆÔØ*CˆÔ'Ø-Ò3°ˆÔØ$7Ò$=¸2ˆÕ!r3   c                ó¤   — d| j                   ›d| j                  ›d| j                  ›d| j                  ›d| j                  ›d| j
                  ›d�S )Nz<BoundLoggerLazyProxy(logger=z, wrapper_class=z, processors=z, context_class=z, initial_values=z, logger_factory_args=z)>)rY   rZ   r[   r\   rT   r^   rU   s    r4   Ú__repr__zBoundLoggerLazyProxy.__repr__O  sk   € à+¨D¯L©LÐ+;Ð;KØ×"Ñ"Ð% ]°4×3CÑ3CÐ2Fð GØ!×0Ñ0Ð3ð 4Ø"×2Ñ2Ð5ð 6#Ø#'×#<Ñ#<Ð"?¸rð	Cð	
r3   c                ó  ‡— | j                   r| j                  | j                  «      }nt        j                  | j                  «      }| j                  }|st        j
                  | j                  Ž }| j                  €t        j                  }n| j                  }| j                  xs t        j                  } ||||¬«      Šdˆfd„}| j                  du s| j                  €t        j                  du r|| _         |di |¤ŽS )zN
        Assemble a new BoundLogger from arguments and configuration.
        )r8   Úcontextc                 ó0   •— | r ‰j                   di | ¤ŽS ‰S )zU
            Use cached assembled logger to bind potentially new values.
            r2   )Úbind)Ú
new_valuesrE   s    €r4   Úfinalized_bindz1BoundLoggerLazyProxy.bind.<locals>.finalized_bindq  s!   ø€ ñ Ø"�v—{‘{Ñ0 ZÑ0Ð0àˆMr3   T©rf   r   Úreturnr   r2   )r\   rT   r6   r%   rY   r'   r^   r[   r$   rZ   r&   r]   r(   re   )rV   rf   ÚctxrY   ÚprocsÚclsrg   rE   s          @r4   re   zBoundLoggerLazyProxy.bindX  së   ø€ ð ×ÒØ×%Ñ% d×&:Ñ&:Ó;‰Cä×/Ñ/°×0DÑ0DÓEˆCà—,‘,ˆÙÜ×,Ñ,¨d×.GÑ.GÐHˆGà×ÑÐ#Ü×.Ñ.‰Eà×$Ñ$ˆEà×!Ñ!ÒB¤W×%BÑ%Bˆñ Ø ¨sô
ˆõ	ð ×*Ñ*¨dÑ2Ø×+Ñ+Ð3Ü×1Ñ1°TÑ9à&ˆDŒIáÑ+ 
Ñ+Ð+r3   c                ó<   —  | j                  «       j                  |Ž S )zs
        Same as bind, except unbind *keys* first.

        In our case that could be only initial values.
        )re   Úunbind©rV   Úkeyss     r4   rn   zBoundLoggerLazyProxy.unbind‚  s   € ð "ˆt�y‰y‹{×!Ñ! 4Ð(Ð(r3   c                ó<   —  | j                  «       j                  |Ž S r>   )re   Ú
try_unbindro   s     r4   rr   zBoundLoggerLazyProxy.try_unbindŠ  s   € Ø%ˆt�y‰y‹{×%Ñ% tÐ,Ð,r3   c                óÀ   — | j                   r| j                  «       j                  «        n"t        j                  «       j                  «         | j                  di |¤ŽS )z+
        Clear context, then bind.
        r2   )r\   Úclearr6   r%   re   )rV   rf   s     r4   ÚnewzBoundLoggerLazyProxy.new�  sK   € ð ×ÒØ×ÑÓ!×'Ñ'Õ)ä×)Ñ)Ó+×1Ñ1Ô3àˆt�y‰yÑ&˜:Ñ&Ð&r3   c                óP   — |dk(  rt         ‚| j                  «       }t        ||«      S )zz
        If a logging method if called on a lazy proxy, we have to create an
        ephemeral BoundLogger first.
        Ú__isabstractmethod__)ÚAttributeErrorre   Úgetattr)rV   ÚnameÚbls      r4   Ú__getattr__z BoundLoggerLazyProxy.__getattr__˜  s+   € ð
 Ð)Ò)Ü Ð à�Y‰Y‹[ˆä�r˜4Ó Ð r3   c                ó   — | j                   S )ú=
        Our __getattr__ magic makes this necessary.
        )Ú__dict__rU   s    r4   Ú__getstate__z!BoundLoggerLazyProxy.__getstate__¤  s   € ð �}‰}Ðr3   c                óN   — |j                  «       D ]  \  }}t        | ||«       Œ y)r~   N)ÚitemsÚsetattr)rV   ÚstateÚkÚvs       r4   Ú__setstate__z!BoundLoggerLazyProxy.__setstate__ª  s$   € ð —K‘K–M‰DˆAˆqÜ�D˜!˜QÕñ "r3   )ri   zdict[str, str])NNNNNN)rE   úWrappedLogger | Noner:   útype[BindableLogger] | Noner8   úIterable[Processor] | Noner9   útype[Context] | Noner(   úbool | NonerA   zdict[str, Any] | Noner=   r   ri   ÚNone)ri   Ústrrh   )rp   rŽ   ri   r   )rz   rŽ   ri   r   ©ri   údict[str, Any])r„   r�   ri   r�   )r)   r*   r+   r,   ÚpropertyrW   r_   ra   re   rn   rr   ru   r|   r€   r‡   r2   r3   r4   rD   rD   )  s«   „ ñð ò$ó ð$ð 6:Ø15Ø.2Ø15Ø04Ø#'ð>à$ð>ð 3ð>ð /ð	>ð
 ,ð>ð $/ð>ð .ð>ð !ð>ð 
ó>ó$
ó(,óT)ó-ó	'ó
!óô r3   rD   )ri   r"   r�   )r@   r   rA   r   ri   r   )NNNNN)rE   rˆ   r8   rŠ   r:   r‰   r9   r‹   r(   rŒ   r=   zIterable[Any] | NonerA   r   ri   r   )r8   rŠ   r:   r‰   r9   r‹   r'   z#Callable[..., WrappedLogger] | Noner(   rŒ   ri   r�   )ri   r�   )6r,   Ú
__future__r   ÚosÚsysrL   Útypingr   r   r   r   r   r	   Ú_nativer   Ú_outputr   Úcontextvarsr   Údevr   r   r   r8   r   r   r   r   r   r   r   ÚenvironÚgetÚstdoutÚhasattrr   r   r-   Údictr.   r/   r0   r1   r!   r6   r#   r;   rB   Ú	getLoggerr?   rH   rO   rQ   rD   r2   r3   r4   Ú<module>r       sf  ðòõ #ã 	Û 
Û ç @× @å 0Ý 'Ý *ß ;Ñ ;ß EÑ Eß EÓ Eðð ØÙÓØÙÐ'¨UÔ3ÙØ�z‰z�~‰~˜j¨"Ó-°Ñ3ò 	
à�J‰J�N‰N˜=¨"Ó-°Ñ3ò àò (Ø—J‘J dÐ*ò(á˜CŸJ™J¨Ó1ò(ð —J‘J×%Ñ%Ó'ôð4Ð Ð0ó ñ& "& d¨7¡m°TÓ!:Ð Ù!<¸QÓ!?Ð Ù"4Ó"6Ð Ø%*Ð "÷Iñ Iñ Ó
€ðó
!óó&Ið@ €	ðð .2Ø15Ø*.Ø-1Ø04ð,Ø ð,à*ð,ð /ð,ð (ð	,ð
  +ð,ð .ð,ð ð,ð 	ó,ð` .2Ø15Ø*.Ø:>Ø-1ð6FØ*ð6Fà.ð6Fð (ð6Fð 8ð	6Fð
  +ð6Fð 
ó6Fðt .2Ø15Ø*.Ø:>Ø-1ð
Ø*ð
à.ð
ð (ð
ð 8ð	
ð
  +ð
ð 
ó
ó<K÷F ò F r3   