ó
    öÞ j±£  ã            	      ó(  • S r SSKJr  SSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
JrJrJrJr  SSKJr  SSKJrJr  \R&                  S:¼  a  SSKJr  OSSKJr  S	S
KJr  S	SKJr  S	SKJrJr  S	SKJrJrJ r   S	SKJ!r!J"r"J#r#  S	SK$J%r%  S	SK&J'r'  S	SKJ(r(J)r)J*r*J+r+J,r,J-r-  / SQr.\R^                  S.S.S jjr0\1" 5       r2 " S S\Rf                  5      r4 " S S\5      r5S/S jr6 " S S5      r7 " S S5      r8 " S S5      r9        S0S  jr:        S0S! jr;        S0S" jr<\Rz                  " S#SS$SS%S&S5      R|                  R                  5       r@ " S' S(5      rAS)rB        S1S* jrC        S2S+ jrD " S, S-\RŠ                  5      rFg)3zÈ
Processors and helpers specific to the :mod:`logging` module from the `Python
standard library <https://docs.python.org/>`_.

See also :doc:`structlog's standard library support <standard-library>`.
é    )ÚannotationsN)ÚCallableÚ
CollectionÚIterableÚSequence)Úpartial)ÚAnyÚcast)é   é   )ÚSelfé   )Ú_config)ÚBoundLoggerBase)Ú_find_first_app_frame_and_nameÚ_format_stack)ÚLEVEL_TO_NAMEÚNAME_TO_LEVELÚadd_log_level)Ú_ASYNC_CALLING_STACKÚ_ASYNC_CALLING_THREADÚmerge_contextvars)Ú	DropEvent)ÚStackInfoRenderer)ÚContextÚ	EventDictÚExcInfoÚ	ProcessorÚProcessorReturnValueÚWrappedLogger)ÚBoundLoggerÚ
ExtraAdderÚLoggerFactoryÚPositionalArgumentsFormatterÚProcessorFormatterr   Úadd_log_level_numberÚadd_logger_nameÚfilter_by_levelÚ
get_loggerÚrecreate_defaultsÚrender_to_log_args_and_kwargsÚrender_to_log_kwargs)Ú	log_levelc           
     óZ  • U b,  SS0n[         R                  " S	S[        R                  U S.UD6  [        R
                  " 5         [        R                  " [        5       [        [        [        [        5       [        R                  S   [        R                  S   /[        [        5       S9  g)
a¦  
Recreate defaults on top of standard library's logging.

The output looks the same, but goes through `logging`.

As with vanilla defaults, the backwards-compatibility guarantees don't
apply to the settings applied here.

Args:
    log_level:
        If `None`, don't configure standard library logging **at all**.

        Otherwise configure it to log to `sys.stdout` at *log_level*
        (``logging.NOTSET`` being the default).

        If you need more control over `logging`, pass `None` here and
        configure it yourself.

.. versionadded:: 22.1.0
.. versionchanged:: 23.3.0 Added `add_logger_name`.
.. versionchanged:: 25.1.0 Added `PositionalArgumentsFormatter`.
NÚforceTú%(message)s)ÚformatÚstreamÚleveléþÿÿÿéÿÿÿÿ)Ú
processorsÚwrapper_classÚlogger_factory© )ÚloggingÚbasicConfigÚsysÚstdoutr   Úreset_defaultsÚ	configurer$   r   r   r'   r   Ú_BUILTIN_DEFAULT_PROCESSORSr!   r#   )r-   Úkws     ÚJ/var/www/html/gaurav/venv/lib/python3.13/site-packages/structlog/stdlib.pyr*   r*   G   s™   € ð. ÑØ�tˆ_ˆä×Òð 	
Ø Ü—:‘:Øñ	
ð ò		
ô ×ÒÔÜ×Òä(Ó*ÜÜÜÜÓÜ×/Ñ/°Ñ3Ü×/Ñ/°Ñ3ð
ô "Ü$“óó    c                  ó2   • \ rS rSrSr S     SS jjrSrg)Ú_FixedFindCallerLoggeré{   z]
Change the behavior of `logging.Logger.findCaller` to cope with
*structlog*'s extra frames.
c                óä   • U(       a  [        SUS-
  5      OSn[        S/US9u  pEU(       a  [        U5      OSnUR                  R                  UR
                  UR                  R                  U4$ )z°
Finds the first caller frame outside of structlog so that the caller
info is populated for wrapping stdlib.

This logger gets set as the default one when using LoggerFactory.
r   r   Nr:   )Ú
stacklevel)Úmaxr   r   Úf_codeÚco_filenameÚf_linenoÚco_name)ÚselfÚ
stack_inforH   Úadjusted_stacklevelÚfÚ_nameÚsinfos          rB   Ú
findCallerÚ!_FixedFindCallerLogger.findCaller�   se   € ö 9Cœc ! Z°!¡^Ô4ÈÐÜ1ØˆKÐ$7ñ
‰ˆö %/”˜aÔ °Dˆà�x‰x×#Ñ# Q§Z¡Z°·±×1AÑ1AÀ5ÐHÐHrC   r9   N©Fr   ©rO   ÚboolrH   ÚintÚreturnz tuple[str, int, str, str | None])Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rT   Ú__static_attributes__r9   rC   rB   rE   rE   {   s3   † ñð ;<ðIØðIØ47ðIà	)÷Ið IrC   rE   c                  óæ  ^ • \ rS rSr% SrS\S'   S/U 4S jjrS0U 4S jjrS0U 4S jjrS/U 4S jjr	S1S2S	 jjr
S1S2S
 jjrS1S2S jjr\rS1S2S jjrS1S2S jjrS1S2S jjr S1       S2S jjr S1         S3S jjr S1         S4U 4S jjjr\S5S j5       r\S6S j5       r\S7S j5       r\S8S j5       r\S7S j5       r\S6S j5       rS9S jr S:     S;S jjr  S<                   S=S jjrS>S jrS?S jrS?S jr S8S jr!S>S jr"S6S  jr#S@S! jr$S@S" jr%S6S# jr&SAS$ jr'          SBS% jr(SCS& jr)SCS' jr*SCS( jr+SCS) jr,SCS* jr-SCS+ jr.SCS, jr/          SDS- jr0S.r1U =r2$ )Er!   é™   aŽ  
Python Standard Library version of `structlog.BoundLogger`.

Works exactly like the generic one except that it takes advantage of
knowing the logging methods in advance.

Use it like::

    structlog.configure(
        wrapper_class=structlog.stdlib.BoundLogger,
    )

It also contains a bunch of properties that pass-through to the wrapped
`logging.Logger` which should make it work as a drop-in replacement.

.. versionadded:: 23.1.0
   Async variants `alog()`, `adebug()`, `ainfo()`, and so forth.

.. versionchanged:: 24.2.0
    Callsite parameters are now also collected by
    `structlog.processors.CallsiteParameterAdder` for async log methods.
úlogging.LoggerÚ_loggerc                ó$   >• [         TU ]  " S0 UD6$ )zC
Return a new logger with *new_values* added to the existing ones.
r9   )ÚsuperÚbind©rN   Ú
new_valuesÚ	__class__s     €rB   rg   ÚBoundLogger.bind³   s   ø€ ô ‰wŠ|Ñ)˜jÑ)Ð)rC   c                ó   >• [         TU ]  " U6 $ )zy
Return a new logger with *keys* removed from the context.

Raises:
    KeyError: If the key is not part of the context.
)rf   Úunbind©rN   Úkeysrj   s     €rB   rm   ÚBoundLogger.unbind¹   s   ø€ ô ‰wŠ~˜tÐ$Ð$rC   c                ó   >• [         TU ]  " U6 $ )z[
Like :meth:`unbind`, but best effort: missing keys are ignored.

.. versionadded:: 18.2.0
)rf   Ú
try_unbindrn   s     €rB   rr   ÚBoundLogger.try_unbindÂ   s   ø€ ô ‰wÒ! 4Ð(Ð(rC   c                ó$   >• [         TU ]  " S0 UD6$ )zÊ
Clear context and binds *initial_values* using `bind`.

Only necessary with dict implementations that keep global state like
those wrapped by `structlog.threadlocal.wrap_dict` when threads
are reused.
r9   )rf   Únewrh   s     €rB   ru   ÚBoundLogger.newÊ   s   ø€ ô ‰wŠ{Ñ(˜ZÑ(Ð(rC   c                ó0   • U R                   " SU/UQ70 UD6$ )z@
Process event and call `logging.Logger.debug` with the result.
Údebug©Ú_proxy_to_logger©rN   ÚeventÚargsrA   s       rB   rx   ÚBoundLogger.debugÔ   ó!   € ð ×$Ò$ W¨eÐA°dÒA¸bÑAÐArC   c                ó0   • U R                   " SU/UQ70 UD6$ )z?
Process event and call `logging.Logger.info` with the result.
Úinfory   r{   s       rB   r�   ÚBoundLogger.infoÚ   s!   € ð ×$Ò$ V¨UÐ@°TÒ@¸RÑ@Ð@rC   c                ó0   • U R                   " SU/UQ70 UD6$ )zB
Process event and call `logging.Logger.warning` with the result.
Úwarningry   r{   s       rB   r„   ÚBoundLogger.warningà   s!   € ð ×$Ò$ Y°ÐC¸ÒCÀÑCÐCrC   c                ó0   • U R                   " SU/UQ70 UD6$ )z@
Process event and call `logging.Logger.error` with the result.
Úerrorry   r{   s       rB   r‡   ÚBoundLogger.errorè   r   rC   c                ó0   • U R                   " SU/UQ70 UD6$ ©zC
Process event and call `logging.Logger.critical` with the result.
Úcriticalry   r{   s       rB   r‹   ÚBoundLogger.criticalî   ó!   € ð ×$Ò$ Z°ÐD¸ÒDÀÑDÐDrC   c                ó0   • U R                   " SU/UQ70 UD6$ rŠ   ry   r{   s       rB   ÚfatalÚBoundLogger.fatalô   r�   rC   c                óT   • UR                  SS5        U R                  " SU/UQ70 UD6$ )z‚
Process event and call `logging.Logger.exception` with the result,
after setting ``exc_info`` to `True` if it's not already set.
Úexc_infoTÚ	exception)Ú
setdefaultrz   r{   s       rB   r“   ÚBoundLogger.exceptionú   s/   € ð 	�‰�j $Ô'Ø×$Ò$ [°%ÐE¸$ÒEÀ"ÑEÐErC   c                ó>   • U R                   " [        U   U/UQ70 UD6$ )zO
Process *event* and call the appropriate logging method depending on
*level*.
)rz   r   ©rN   r3   r|   r}   rA   s        rB   ÚlogÚBoundLogger.log  s&   € ð ×$Ò$¤]°5Ñ%9¸5ÐNÀ4ÒNÈ2ÑNÐNrC   c                ó@   >• U(       a  X4S'   [         TU ]  " U4SU0UD6$ )zê
Propagate a method call to the wrapped logger.

This is the same as the superclass implementation, except that
it also preserves positional arguments in the ``event_dict`` so
that the stdlib's support for format strings can be used.
Úpositional_argsr|   )rf   rz   )rN   Úmethod_namer|   Ú
event_argsÚevent_kwrj   s        €rB   rz   ÚBoundLogger._proxy_to_logger  s+   ø€ ö Ø*4Ð&Ñ'ä‰wÒ'¨ÑM¸5ÐMÀHÑMÐMrC   c                ó.   • U R                   R                  $ )z%
Returns :attr:`logging.Logger.name`
)rd   Úname©rN   s    rB   r¡   ÚBoundLogger.name#  s   € ð
 �|‰|× Ñ Ð rC   c                ó.   • U R                   R                  $ )z&
Returns :attr:`logging.Logger.level`
)rd   r3   r¢   s    rB   r3   ÚBoundLogger.level*  s   € ð
 �|‰|×!Ñ!Ð!rC   c                ó.   • U R                   R                  $ )z'
Returns :attr:`logging.Logger.parent`
)rd   Úparentr¢   s    rB   r§   ÚBoundLogger.parent1  s   € ð
 �|‰|×"Ñ"Ð"rC   c                ó.   • U R                   R                  $ )z*
Returns :attr:`logging.Logger.propagate`
)rd   Ú	propagater¢   s    rB   rª   ÚBoundLogger.propagate8  s   € ð
 �|‰|×%Ñ%Ð%rC   c                ó.   • U R                   R                  $ )z)
Returns :attr:`logging.Logger.handlers`
)rd   Úhandlersr¢   s    rB   r­   ÚBoundLogger.handlers?  ó   € ð
 �|‰|×$Ñ$Ð$rC   c                ó.   • U R                   R                  $ )z)
Returns :attr:`logging.Logger.disabled`
)rd   Údisabledr¢   s    rB   r±   ÚBoundLogger.disabledF  r¯   rC   c                ó:   • U R                   R                  U5        g)zB
Calls :meth:`logging.Logger.setLevel` with unmodified arguments.
N)rd   ÚsetLevel©rN   r3   s     rB   r´   ÚBoundLogger.setLevelM  s   € ð 	�‰×Ñ˜eÕ$rC   c                ó4   • U R                   R                  XS9$ )zD
Calls :meth:`logging.Logger.findCaller` with unmodified arguments.
)rO   rH   )rd   rT   )rN   rO   rH   s      rB   rT   ÚBoundLogger.findCallerS  s#   € ð �|‰|×&Ñ&Ø!ð 'ð 
ð 	
rC   c
                ó<   • U R                   R                  XX4XVXxU	S9	$ )zD
Calls :meth:`logging.Logger.makeRecord` with unmodified arguments.
)ÚfuncÚextra)rd   Ú
makeRecord)
rN   r¡   r3   ÚfnÚlnoÚmsgr}   r’   rº   r»   s
             rB   r¼   ÚBoundLogger.makeRecord_  s+   € ð �|‰|×&Ñ&Ø˜ #¨XÈð 'ð 
ð 	
rC   c                ó:   • U R                   R                  U5        g)z@
Calls :meth:`logging.Logger.handle` with unmodified arguments.
N)rd   Úhandle©rN   Úrecords     rB   rÂ   ÚBoundLogger.handler  s   € ð 	�‰×Ñ˜FÕ#rC   c                ó:   • U R                   R                  U5        g)zD
Calls :meth:`logging.Logger.addHandler` with unmodified arguments.
N)rd   Ú
addHandler©rN   Úhdlrs     rB   rÇ   ÚBoundLogger.addHandlerx  s   € ð 	�‰×Ñ Õ%rC   c                ó:   • U R                   R                  U5        g)zG
Calls :meth:`logging.Logger.removeHandler` with unmodified arguments.
N)rd   ÚremoveHandlerrÈ   s     rB   rÌ   ÚBoundLogger.removeHandler~  s   € ð 	�‰×"Ñ" 4Õ(rC   c                ó6   • U R                   R                  5       $ )z_
Calls :meth:`logging.Logger.hasHandlers` with unmodified arguments.

Exists only in Python 3.
)rd   ÚhasHandlersr¢   s    rB   rÏ   ÚBoundLogger.hasHandlers„  s   € ð �|‰|×'Ñ'Ó)Ð)rC   c                ó:   • U R                   R                  U5        g)zF
Calls :meth:`logging.Logger.callHandlers` with unmodified arguments.
N)rd   ÚcallHandlersrÃ   s     rB   rÒ   ÚBoundLogger.callHandlersŒ  s   € ð 	�‰×!Ñ! &Õ)rC   c                ó6   • U R                   R                  5       $ )zK
Calls :meth:`logging.Logger.getEffectiveLevel` with unmodified
arguments.
©rd   ÚgetEffectiveLevelr¢   s    rB   rÖ   ÚBoundLogger.getEffectiveLevel’  s   € ð
 �|‰|×-Ñ-Ó/Ð/rC   c                ó8   • U R                   R                  U5      $ )zF
Calls :meth:`logging.Logger.isEnabledFor` with unmodified arguments.
©rd   ÚisEnabledForrµ   s     rB   rÚ   ÚBoundLogger.isEnabledFor™  s   € ð �|‰|×(Ñ(¨Ó/Ð/rC   c                ó8   • U R                   R                  U5      $ )aZ  
A snake_case alias of `isEnabledFor` for compatibility with
`structlog.typing.FilteringBoundLogger`.

.. note::

   This method is more complex than the native `is_enabled_for` since
   it supports standard library-only features like
   :attr:`logging.Logger.disabled` while the native one only compares
   log levels.

.. versionadded:: 26.1.0
rÙ   rµ   s     rB   Úis_enabled_forÚBoundLogger.is_enabled_forŸ  s   € ð �|‰|×(Ñ(¨Ó/Ð/rC   c                ó6   • U R                   R                  5       $ )z…
A snake_case alias of `getEffectiveLevel` for compatibility with
`structlog.typing.FilteringBoundLogger`.

.. versionadded:: 26.1.0
rÕ   r¢   s    rB   Úget_effective_levelÚBoundLogger.get_effective_level¯  s   € ð �|‰|×-Ñ-Ó/Ð/rC   c                ó8   • U R                   R                  U5      $ )zB
Calls :meth:`logging.Logger.getChild` with unmodified arguments.
)rd   ÚgetChild)rN   Úsuffixs     rB   rã   ÚBoundLogger.getChild¸  s   € ð �|‰|×$Ñ$ VÓ,Ð,rC   c              ƒ  ót  ^^^^^#   • [         R                  " [        R                  " 5       [        R                  " 5       R
                  45      n[        R                  " [        R                  " 5       R                  R                  5      n[        R                  " 5       m [        R                  " 5       R                  SUUUUU4S j5      I Sh  v•N   [        R                  " U5        [         R                  " U5        g N1! [        R                  " U5        [         R                  " U5        f = f7f)úC
Merge contextvars and log using the sync logger in a thread pool.
Nc                 ó4   >• TR                  U UUU4S j5      $ )Nc                 ó   >• T" T/T Q70 TD6$ ©Nr9   ©r}   r|   rA   Úmeths   €€€€rB   Ú<lambda>ÚABoundLogger._dispatch_to_sync.<locals>.<lambda>.<locals>.<lambda>Ó  ó   ø€ ©¨UÐ(@°TÒ(@¸RÒ(@rC   ©Úrun©r}   Úctxr|   rA   rì   s   €€€€€rB   rí   Ú/BoundLogger._dispatch_to_sync.<locals>.<lambda>Ó  ó   ø€ ˜Ÿ™× @ÔArC   )r   ÚsetÚ	threadingÚ	get_identÚcurrent_threadr¡   r   r<   Ú	_getframeÚf_backÚcontextvarsÚcopy_contextÚasyncioÚget_running_loopÚrun_in_executorÚreset©rN   rì   r|   r}   rA   Úthread_tokenÚ	scs_tokenró   s    ````  @rB   Ú_dispatch_to_syncÚBoundLogger._dispatch_to_sync¿  sÛ   üé € ô -×0Ò0Ü× Ò Ó"¤I×$<Ò$<Ó$>×$CÑ$CÐDó
ˆô )×,Ò,¬S¯]ª]«_×-CÑ-C×-JÑ-JÓKˆ	Ü×&Ò&Ó(ˆð	6Ü×*Ò*Ó,×<Ñ<ØßAÐAó÷ ð ô
 !×&Ò& yÔ1Ü!×'Ò'¨Õ5ñøô
 !×&Ò& yÔ1Ü!×'Ò'¨Õ5üs0   ‡BD8Â#0D ÃDÃD Ã-D8ÄD Ä.D5Ä5D8c              �  óZ   #   • U R                  U R                  XU5      I Sh  v•N   g N7f)zY
Log using `debug()`, but asynchronously in a separate thread.

.. versionadded:: 23.1.0
N)r  rx   r{   s       rB   ÚadebugÚBoundLogger.adebugÙ  ó#   é € ð ×$Ñ$ T§Z¡Z°¸bÓA×AÓAùó   ‚!+£)¤+c              �  óZ   #   • U R                  U R                  XU5      I Sh  v•N   g N7f)zX
Log using `info()`, but asynchronously in a separate thread.

.. versionadded:: 23.1.0
N)r  r�   r{   s       rB   ÚainfoÚBoundLogger.ainfoá  s#   é € ð ×$Ñ$ T§Y¡Y°¸RÓ@×@Ó@ùr  c              �  óZ   #   • U R                  U R                  XU5      I Sh  v•N   g N7f)z[
Log using `warning()`, but asynchronously in a separate thread.

.. versionadded:: 23.1.0
N)r  r„   r{   s       rB   ÚawarningÚBoundLogger.awarningé  s#   é € ð ×$Ñ$ T§\¡\°5ÀÓC×CÓCùr  c              �  óZ   #   • U R                  U R                  XU5      I Sh  v•N   g N7f)zY
Log using `error()`, but asynchronously in a separate thread.

.. versionadded:: 23.1.0
N)r  r‡   r{   s       rB   ÚaerrorÚBoundLogger.aerrorñ  r
  r  c              �  óZ   #   • U R                  U R                  XU5      I Sh  v•N   g N7f©z\
Log using `critical()`, but asynchronously in a separate thread.

.. versionadded:: 23.1.0
N©r  r‹   r{   s       rB   Ú	acriticalÚBoundLogger.acriticalù  ó#   é € ð ×$Ñ$ T§]¡]°EÀÓD×DÓDùr  c              �  óZ   #   • U R                  U R                  XU5      I Sh  v•N   g N7fr  r  r{   s       rB   ÚafatalÚBoundLogger.afatal  r  r  c              �  óØ   #   • UR                  SS5      SL a*  UR                  S5      c  [        R                  " 5       US'   U R                  U R                  XU5      I Sh  v•N   g N7f)z]
Log using `exception()`, but asynchronously in a separate thread.

.. versionadded:: 23.1.0
r’   Tr“   N)Úgetr<   r’   r  r“   r{   s       rB   Ú
aexceptionÚBoundLogger.aexception	  sS   é € ð �6‰6�*˜dÓ# tÒ+°·±°{Ó0CÑ0KÜ Ÿ\š\›^ˆBˆz‰Nà×$Ñ$ T§^¡^°UÀ"ÓE×EÓEùs   ‚A A*Á"A(Á#A*c              �  ón   #   • U R                  [        U R                  U5      X#U5      I Sh  v•N   g N7f)zW
Log using `log()`, but asynchronously in a separate thread.

.. versionadded:: 23.1.0
N)r  r   r˜   r—   s        rB   ÚalogÚBoundLogger.alog  s*   é € ð ×$Ñ$¤W¨T¯X©X°uÓ%=¸uÈBÓO×OÓOùó   ‚+5­3®5r9   ©ri   r	   rZ   r   ©ro   ÚstrrZ   r   rê   )r|   ú
str | Noner}   r	   rA   r	   rZ   r	   )
r3   rY   r|   r)  r}   r	   rA   r	   rZ   r	   )
rœ   r(  r|   r)  r�   r(  rž   r	   rZ   r	   )rZ   r(  )rZ   rY   )rZ   r	   )rZ   rX   )r3   rY   rZ   ÚNonerV   rW   )NN)r¡   r(  r3   rY   r½   r(  r¾   rY   r¿   r(  r}   útuple[Any, ...]r’   r   rº   r)  r»   r	   rZ   úlogging.LogRecord)rÄ   r,  rZ   r*  )rÉ   zlogging.HandlerrZ   r*  )r3   rY   rZ   rX   )rä   r(  rZ   rc   ©
rì   zCallable[..., Any]r|   r(  r}   r+  rA   zdict[str, Any]rZ   r*  ©r|   r(  r}   r	   rA   r	   rZ   r*  ©
r3   r	   r|   r(  r}   r	   rA   r	   rZ   r*  )3r[   r\   r]   r^   r_   Ú__annotations__rg   rm   rr   ru   rx   r�   r„   Úwarnr‡   r‹   r�   r“   r˜   rz   Úpropertyr¡   r3   r§   rª   r­   r±   r´   rT   r¼   rÂ   rÇ   rÌ   rÏ   rÒ   rÖ   rÚ   rÝ   rà   rã   r  r  r  r  r  r  r  r   r#  r`   Ú__classcell__©rj   s   @rB   r!   r!   ™   sÔ  ø‡ ñð. Ó÷*÷%÷)÷)öBöAöDð €DöBöEöEð #'ðFØðFØ/2ðFØ:=ðFà	õFð /3ðOØðOØ!+ðOØ;>ðOØFIðOà	õOð !ðNàðNð ðNð ð	Nð
 ðNð 
÷Nð Nð, ó!ó ð!ð ó"ó ð"ð ó#ó ð#ð ó&ó ð&ð ó%ó ð%ð ó%ó ð%ô%ð ;<ð

Øð

Ø47ð

à	)õ

ð*  Øð
àð
ð ð
ð ð	
ð
 ð
ð ð
ð ð
ð ð
ð ð
ð ð
ð 
õ
ô&$ô&ô)ô*ô*ô0ô0ô0ô 0ô-ð6à ð6ð ð6ð ð	6ð
 ð6ð 
ô6ô4BôAôDôBôEôEôFðPØðPØ!$ðPØ-0ðPØ8;ðPà	÷Pò PrC   r!   c                 ó.   • [         R                  " U 0 UD6$ )a  
Only calls `structlog.get_logger`, but has the correct type hints.

.. warning::

   Does **not** check whether -- or ensure that -- you've configured
   *structlog* for standard library :mod:`logging`!

   See :doc:`standard-library` for details.

.. versionadded:: 20.2.0
)r   r)   )r}   Úinitial_valuess     rB   r)   r)   !  s   € ô ×Ò˜tÐ6 ~Ñ6Ð6rC   c                  ó
  • \ rS rSr% SrSrS\S'   Sr\r	SSS.         SS jjr
\SS	 j5       rSS
 jrSS jrSS jrSS jr          SS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSS jrSrg)ÚAsyncBoundLoggeri1  a  
Wraps a `BoundLogger` & exposes its logging methods as ``async`` versions.

This approach has turned out to be a mistake and the class has been
deprecated in 23.1.0. Use the regular `BoundLogger` with its a-prefixed
methods instead.

.. versionadded:: 20.2.0
.. versionchanged:: 20.2.0 fix _dispatch_to_sync contextvars usage
.. deprecated:: 23.1.0
   Use the regular `BoundLogger` with its a-prefixed methods instead.
.. versionchanged:: 23.3.0
    Callsite parameters are now also collected for async log methods.
)Ú_loopÚsync_blr!   r:  N)Ú_sync_blr9  c               óŠ   • U(       a  X@l         XPl        g U R                  XUS9U l         [        R                  " 5       U l        g )N)Úloggerr6   Úcontext)r:  r9  Ú_bound_logger_factoryrþ   rÿ   )rN   r=  r6   r>  r;  r9  s         rB   Ú__init__ÚAsyncBoundLogger.__init__J  sB   € ö Ø#ŒLØŒJàà×1Ñ1Ø¸'ð 2ð 
ˆŒô ×-Ò-Ó/ˆ�
rC   c                ó.   • U R                   R                  $ rê   )r:  Ú_contextr¢   s    rB   rC  ÚAsyncBoundLogger._contexta  s   € à�|‰|×$Ñ$Ð$rC   c           
     óp   • U R                  S S0 U R                  R                  " S0 UD6U R                  S9$ ©Nr9   )r=  r6   r>  r;  r9  )rj   r:  rg   r9  ©rN   ri   s     rB   rg   ÚAsyncBoundLogger.binde  s?   € Ø�~‰~ð ØØØ—\‘\×&Ò&Ñ4¨Ñ4Ø—*‘*ð ð 	
ð 		
rC   c           
     óp   • U R                  S S0 U R                  R                  " S0 UD6U R                  S9$ rF  )rj   r:  ru   r9  rG  s     rB   ru   ÚAsyncBoundLogger.newq  s=   € Ø�~‰~àØØØ—\‘\×%Ò%Ñ3¨
Ñ3Ø—*‘*ð ð 
ð 	
rC   c                ój   • U R                  S S0 U R                  R                  " U6 U R                  S9$ rF  )rj   r:  rm   r9  ©rN   ro   s     rB   rm   ÚAsyncBoundLogger.unbind{  s:   € Ø�~‰~àØØØ—\‘\×(Ò(¨$Ð/Ø—*‘*ð ð 
ð 	
rC   c                ój   • U R                  S S0 U R                  R                  " U6 U R                  S9$ rF  )rj   r:  rr   r9  rL  s     rB   rr   ÚAsyncBoundLogger.try_unbind…  s:   € Ø�~‰~àØØØ—\‘\×,Ò,¨dÐ3Ø—*‘*ð ð 
ð 	
rC   c              ƒ  óˆ  ^^^^^#   • [         R                  " [        R                  " 5       [        R                  " 5       R
                  45      n[        R                  " [        R                  " 5       R                  R                  5      n[        R                  " 5       m [        R                  " 5       R                  U R                  UUUUU4S j5      I Sh  v•N   [        R                   " U5        [         R                   " U5        g N1! [        R                   " U5        [         R                   " U5        f = f7f)rç   c                 ó4   >• TR                  U UUU4S j5      $ )Nc                 ó   >• T" T/T Q70 TD6$ rê   r9   rë   s   €€€€rB   rí   ÚFAsyncBoundLogger._dispatch_to_sync.<locals>.<lambda>.<locals>.<lambda>£  rï   rC   rð   rò   s   €€€€€rB   rí   Ú4AsyncBoundLogger._dispatch_to_sync.<locals>.<lambda>£  rõ   rC   N)r   rö   r÷   rø   rù   r¡   r   r<   rú   rû   rü   rý   rþ   rÿ   r   Ú	_executorr  r  s    ````  @rB   r  Ú"AsyncBoundLogger._dispatch_to_sync�  sß   üé € ô -×0Ò0Ü× Ò Ó"¤I×$<Ò$<Ó$>×$CÑ$CÐDó
ˆô )×,Ò,¬S¯]ª]«_×-CÑ-C×-JÑ-JÓKˆ	Ü×&Ò&Ó(ˆð	6Ü×*Ò*Ó,×<Ñ<Ø—‘ßAÐAó÷ ð ô
 !×&Ò& yÔ1Ü!×'Ò'¨Õ5ñøô
 !×&Ò& yÔ1Ü!×'Ò'¨Õ5üs0   ‡BEÂ#:D ÃDÃD Ã"-EÄD Ä.D?Ä?Ec              �  ón   #   • U R                  U R                  R                  XU5      I S h  v•N   g  N7frê   )r  r:  rx   r{   s       rB   rx   ÚAsyncBoundLogger.debug©  ó'   é € Ø×$Ñ$ T§\¡\×%7Ñ%7¸ÀbÓI×IÓIùr%  c              �  ón   #   • U R                  U R                  R                  XU5      I S h  v•N   g  N7frê   )r  r:  r�   r{   s       rB   r�   ÚAsyncBoundLogger.info¬  s'   é € Ø×$Ñ$ T§\¡\×%6Ñ%6¸ÀRÓH×HÓHùr%  c              �  ón   #   • U R                  U R                  R                  XU5      I S h  v•N   g  N7frê   ©r  r:  r„   r{   s       rB   r„   ÚAsyncBoundLogger.warning¯  ó'   é € Ø×$Ñ$ T§\¡\×%9Ñ%9¸5ÈÓK×KÓKùr%  c              �  ón   #   • U R                  U R                  R                  XU5      I S h  v•N   g  N7frê   r]  r{   s       rB   r1  ÚAsyncBoundLogger.warn²  r_  r%  c              �  ón   #   • U R                  U R                  R                  XU5      I S h  v•N   g  N7frê   )r  r:  r‡   r{   s       rB   r‡   ÚAsyncBoundLogger.errorµ  rY  r%  c              �  ón   #   • U R                  U R                  R                  XU5      I S h  v•N   g  N7frê   ©r  r:  r‹   r{   s       rB   r‹   ÚAsyncBoundLogger.critical¸  ó'   é € Ø×$Ñ$ T§\¡\×%:Ñ%:¸EÈÓL×LÓLùr%  c              �  ón   #   • U R                  U R                  R                  XU5      I S h  v•N   g  N7frê   re  r{   s       rB   r�   ÚAsyncBoundLogger.fatal»  rg  r%  c              �  óî   #   • UR                  SS 5      nUc'  UR                  S5      c  [        R                  " 5       nXCS'   U R	                  U R
                  R                  XU5      I S h  v•N   g  N7f)Nr’   r“   )Úpopr  r<   r’   r  r:  r“   )rN   r|   r}   rA   Úeis        rB   r“   ÚAsyncBoundLogger.exception¾  s^   é € ð �V‰V�J Ó%ˆØ‰:˜"Ÿ&™& Ó-Ñ5Ü—’“ˆBàˆ:‰à×$Ñ$ T§\¡\×%;Ñ%;¸UÈ"ÓM×MÓMùs   ‚A+A5Á-A3Á.A5c              �  ó‚   #   • U R                  [        U R                  R                  U5      X#U5      I S h  v•N   g  N7frê   )r  r   r:  r˜   r—   s        rB   r˜   ÚAsyncBoundLogger.logÉ  s5   é € Ø×$Ñ$Ü�D—L‘L×$Ñ$ eÓ,¨e¸2ó
÷ 	
ó 	
ùs   ‚5?·=¸?)
r=  rc   r6   zIterable[Processor]r>  r   r;  r	   r9  r	   )rZ   r   r&  r'  r-  r.  r/  )r[   r\   r]   r^   r_   Ú	__slots__r0  rU  r!   r?  r@  r2  rC  rg   ru   rm   rr   r  rx   r�   r„   r1  r‡   r‹   r�   r“   r˜   r`   r9   rC   rB   r8  r8  1  sð   ‡ ñð %€Ið Óà€IØ'Ðð Øñ0àð0ð (ð0ð ð	0ð ð0ð õ0ð. ó%ó ð%ô

ô
ô
ô
ð6à ð6ð ð6ð ð	6ð
 ð6ð 
ô6ô4JôIôLôLôJôMôMô	N÷
rC   r8  c                  ó0   • \ rS rSrSrSSS jjrS	S jrSrg)
r#   iÏ  a‚  
Build a standard library logger when an *instance* is called.

Sets a custom logger using :func:`logging.setLoggerClass` so variables in
log format are expanded properly.

>>> from structlog import configure
>>> from structlog.stdlib import LoggerFactory
>>> configure(logger_factory=LoggerFactory())

Args:
    ignore_frame_names:
        When guessing the name of a logger, skip frames whose names *start*
        with one of these.  For example, in pyramid applications you'll
        want to set it to ``["venusian", "pyramid.config"]``. This argument
        is called *additional_ignores* in other APIs throughout
        *structlog*.
Nc                óD   • Xl         [        R                  " [        5        g rê   )Ú_ignorer:   ÚsetLoggerClassrE   )rN   Úignore_frame_namess     rB   r@  ÚLoggerFactory.__init__ã  s   € Ø)ŒÜ×ÒÔ5Õ6rC   c                óœ   • U(       a  [         R                  " US   5      $ [        U R                  5      u  p#[         R                  " U5      $ )aý  
Deduce the caller's module name and create a stdlib logger.

If an optional argument is passed, it will be used as the logger name
instead of guesswork.  This optional argument would be passed from the
:func:`structlog.get_logger` call.  For example
``structlog.get_logger("foo")`` would cause this method to be called
with ``"foo"`` as its first positional argument.

.. versionchanged:: 0.4.0
    Added support for optional positional arguments.  Using the first
    one for naming the constructed logger.
r   )r:   Ú	getLoggerr   rs  )rN   r}   Ú_r¡   s       rB   Ú__call__ÚLoggerFactory.__call__ç  s?   € ö Ü×$Ò$ T¨!¡WÓ-Ð-ô 1°·±Ó>‰ˆä× Ò  Ó&Ð&rC   )rs  rê   )ru  zlist[str] | None)r}   r	   rZ   rc   ©r[   r\   r]   r^   r_   r@  rz  r`   r9   rC   rB   r#   r#   Ï  s   † ñö&7÷'rC   r#   c                  ó@   • \ rS rSrSrSSS jjr        S	S jrSrg)
r$   iÿ  a  
Apply stdlib-like string formatting to the ``event`` key.

If the ``positional_args`` key in the event dict is set, it must
contain a tuple that is used for formatting (using the ``%s`` string
formatting operator) of the value from the ``event`` key.  This works
in the same way as the stdlib handles arguments to the various log
methods: if the tuple contains only a single `dict` argument it is
used for keyword placeholders in the ``event`` string, otherwise it
will be used for positional placeholders.

``positional_args`` is populated by `structlog.stdlib.BoundLogger` or
can be set manually.

The *remove_positional_args* flag can be set to `False` to keep the
``positional_args`` key in the event dict; by default it will be
removed from the event dict after formatting a message.
c                ó   • Xl         g rê   ©Úremove_positional_args)rN   r€  s     rB   r@  Ú%PositionalArgumentsFormatter.__init__  s   € Ø&<Õ#rC   c                óê   • UR                  S5      nU(       aC  [        U5      S:X  a'  [        US   [        5      (       a  US   (       a  US   nUS==   U-  ss'   U R                  (       a  Ub  US	 U$ )Nr›   r   r   r|   )r  ÚlenÚ
isinstanceÚdictr€  )rN   ry  Ú__Ú
event_dictr}   s        rB   rz  Ú%PositionalArgumentsFormatter.__call__  so   € ð �~‰~Ð/Ó0ˆö Ü�4‹y˜A‹~¤*¨T°!©W´d×";Ñ";ÀÀQÇØ˜A‘w�à�wÓ 4Ñ'Óà×&×&¨4Ñ+;ØÐ,Ð-àÐrC   r  N)T)r€  rX   rZ   r*  ©ry  r    r†  r(  r‡  r   rZ   r   r|  r9   rC   rB   r$   r$   ÿ  s1   † ñö&=ðØðØ$'ðØ5>ðà	÷rC   r$   c                ój   • U R                   (       d  [        U   U R                  5       :¼  a  U$ [        e)a  
Check whether logging is configured to accept messages from this log level.

Should be the first processor if stdlib's filtering by level is used so
possibly expensive processors like exception formatters are avoided in the
first place.

>>> import logging
>>> from structlog.stdlib import filter_by_level
>>> logging.basicConfig(level=logging.WARN)
>>> logger = logging.getLogger()
>>> filter_by_level(logger, 'warn', {})
{}
>>> filter_by_level(logger, 'debug', {})
Traceback (most recent call last):
...
DropEvent
)r±   r   rÖ   r   ©r=  rœ   r‡  s      rB   r(   r(   +  s,   € ð0 �O�OÜ˜+Ñ&¨&×*BÑ*BÓ*DÓDàÐä
€OrC   c                ó   • [         U   US'   U$ )a‘  
Add the log level number to the event dict.

Log level numbers map to the log level names. The Python stdlib uses them
for filtering logic. This adds the same numbers so users can leverage
similar filtering. Compare::

   level in ("warning", "error", "critical")
   level_number >= 30

The mapping of names to numbers is in
``structlog.stdlib._log_levels._NAME_TO_LEVEL``.

.. versionadded:: 18.2.0
Úlevel_number)r   r‹  s      rB   r&   r&   K  s   € ô$ "/¨{Ñ!;€Jˆ~ÑàÐrC   c                ón   • UR                  S5      nUc  U R                  US'   U$ UR                  US'   U$ )z(
Add the logger name to the event dict.
Ú_recordr=  )r  r¡   )r=  rœ   r‡  rÄ   s       rB   r'   r'   b  sC   € ð �^‰^˜IÓ&€FØ�~Ø%Ÿ{™{ˆ
�8Ñð Ðð  &Ÿ{™{ˆ
�8ÑØÐrC   r¡   Úpathnamer¿   r9   c                  óˆ   • \ rS rSrSrSrS	S
S jjr        SS jr\      SS j5       r	\        SS j5       r
Srg)r"   iu  aP  
Add extra attributes of `logging.LogRecord` objects to the event
dictionary.

This processor can be used for adding data passed in the ``extra``
parameter of the `logging` module's log methods to the event dictionary.

Args:
    allow:
        An optional collection of attributes that, if present in
        `logging.LogRecord` objects, will be copied to event dictionaries.

        If ``allow`` is None all attributes of `logging.LogRecord` objects
        that do not exist on a standard `logging.LogRecord` object will be
        copied to event dictionaries.

.. versionadded:: 21.5.0
)Ú_copierNc                ó‚   • U   Ub)  [         R                  " U R                  / UQ5      U l        g U R                  U l        g rê   )Ú	functoolsr   Ú_copy_allowedr’  Ú	_copy_all)rN   Úallows     rB   r@  ÚExtraAdder.__init__‹  s6   € ÙØÑô %×,Ò,¨T×-?Ñ-?ÀÀ5ÀÓJˆD�LàŸ>™>ˆD�LrC   c                óP   • UR                  S5      nUb  U R                  X45        U$ )Nr�  )r  r’  )rN   r=  r¡   r‡  rÄ   s        rB   rz  ÚExtraAdder.__call__•  s*   € ð ,6¯>©>¸)Ó+DˆØÑØ�L‰L˜Ô,ØÐrC   c                ój   • UR                   R                  5        H  u  p4U[        ;  d  M  XAU'   M     g rê   )Ú__dict__ÚitemsÚ_LOG_RECORD_KEYS)Úclsr‡  rÄ   ÚkeyÚvalues        rB   r–  ÚExtraAdder._copy_all�  s-   € ð !Ÿ/™/×/Ñ/Ö1‰JˆCØÔ*Õ*Ø"'˜3“ò 2rC   c                óZ   • U H%  nXCR                   ;   d  M  UR                   U   X$'   M'     g rê   )rœ  )rŸ  r—  r‡  rÄ   r   s        rB   r•  ÚExtraAdder._copy_allowed¥  s(   € ó ˆCØ—o‘oÕ%Ø"(§/¡/°#Ñ"6�
“ò rC   rê   )r—  zCollection[str] | NonerZ   r*  )r=  rc   r¡   r(  r‡  r   rZ   r   )r‡  r   rÄ   r,  rZ   r*  )r—  zCollection[str]r‡  r   rÄ   r,  rZ   r*  )r[   r\   r]   r^   r_   rp  r@  rz  Úclassmethodr–  r•  r`   r9   rC   rB   r"   r"   u  sž   † ñð& €Iö*ðØ$ðØ,/ðØ=Fðà	ôð ð(Ø"ð(Ø,=ð(à	ó(ó ð(ð ð7àð7ð ð7ð "ð	7ð
 
ó7ó ó7rC   r"   )r’   rO   rH   c                óÈ   • UR                  S5      /UR                  SS5      Q7n[         Vs0 sH  nXB;   d  M
  XBR                  U5      _M     nnU(       a  X%S'   X54$ s  snf )a  
Render ``event_dict`` into positional and keyword arguments for
`logging.Logger` logging methods.
See `logging.Logger.debug` method for keyword arguments reference.

The ``event`` field is passed in the first positional argument, positional
arguments from ``positional_args`` field are passed in subsequent positional
arguments, keyword arguments are extracted from the *event_dict* and the
rest of the *event_dict* is added as ``extra``.

This allows you to defer formatting to `logging`.

.. versionadded:: 25.1.0
r|   r›   r9   r»   ©rk  ÚLOG_KWARG_NAMES)ry  r†  r‡  r}   Ú
kwarg_nameÚkwargss         rB   r+   r+   ´  su   € ð" �N‰N˜7Ó#ÐL j§n¡nÐ5FÈÓ&KÑL€Dõ *óá)ˆJØÑ#ó 	/ˆ
—N‘N :Ó.Ò.Ù)ð ð ö
 Ø$ˆw‰àˆ<Ðùòs
   ®AºAc                óŒ   • UR                  S5      US.[         Vs0 sH  nX2;   d  M
  X2R                  U5      _M     snE$ s  snf )aW  
Render ``event_dict`` into keyword arguments for `logging.Logger` logging
methods.
See `logging.Logger.debug` method for keyword arguments reference.

The ``event`` field is translated into ``msg``, keyword arguments are
extracted from the *event_dict* and the rest of the *event_dict* is added as
``extra``.

This allows you to defer formatting to `logging`.

.. versionadded:: 17.1.0
.. versionchanged:: 22.1.0
   ``exc_info``, ``stack_info``, and ``stacklevel`` are passed as proper
   kwargs and not put into ``extra``.
.. versionchanged:: 24.2.0
   ``stackLevel`` corrected to ``stacklevel``.
r|   )r¿   r»   r§  )ry  r†  r‡  rA   s       rB   r,   r,   Ò  sX   € ð, �~‰~˜gÓ&Øñõ
 &ó
á%�ØÑó #ˆB—‘˜rÓ"Ò"Ù%ñ
ðð ùò
s
   œA¨Ac                  óÆ   ^ • \ rS rSrSr        S                     S	U 4S jjjrS
U 4S jjr\        SS j5       r\        SS j5       r	Sr
U =r$ )r%   iò  aÌ  
Call *structlog* processors on `logging.LogRecord`\s.

This is an implementation of a `logging.Formatter` that can be used to
format log entries from both *structlog* and `logging`.

Its static method `wrap_for_formatter` must be the final processor in
*structlog*'s processor chain.

Please refer to :ref:`processor-formatter` for examples.

Args:
    foreign_pre_chain:
        If not `None`, it is used as a processor chain that is applied to
        **non**-*structlog* log entries before the event dictionary is
        passed to *processors*. (default: `None`)

    processors:
        A chain of *structlog* processors that is used to process **all**
        log entries. The last one must render to a `str` which then gets
        passed on to `logging` for output.

        Compared to *structlog*'s regular processor chains, there's a few
        differences:

        - The event dictionary contains two additional keys:

          #. ``_record``: a `logging.LogRecord` that either was created
              using `logging` APIs, **or** is a wrapped *structlog* log
              entry created by `wrap_for_formatter`.

          #. ``_from_structlog``: a `bool` that indicates whether or not
             ``_record`` was created by a *structlog* logger.

          Since you most likely don't want ``_record`` and
          ``_from_structlog`` in your log files,  we've added the static
          method `remove_processors_meta` to ``ProcessorFormatter`` that
          you can add just before your renderer.

        - Since this is a `logging` *formatter*, raising
          `structlog.DropEvent` will crash your application.

    keep_exc_info:
        ``exc_info`` on `logging.LogRecord`\ s is added to the
        ``event_dict`` and removed afterwards. Set this to ``True`` to keep
        it on the `logging.LogRecord`. (default: False)

    keep_stack_info:
        Same as *keep_exc_info* except for ``stack_info``. (default: False)

    logger:
        Logger which we want to push through the *structlog* processor
        chain. This parameter is necessary for some of the processors like
        `filter_by_level`. (default: None)

    pass_foreign_args:
        If True, pass a foreign log record's ``args`` attribute to the
        ``event_dict`` under ``positional_args`` key. (default: False)

    processor:
        A single *structlog* processor used for rendering the event
        dictionary before passing it off to `logging`. Must return a `str`.
        The event dictionary does **not** contain ``_record`` and
        ``_from_structlog``.

        This parameter exists for historic reasons. Please use *processors*
        instead.

    use_get_message:
        If True, use ``record.getMessage`` to get a fully rendered log
        message, otherwise use ``str(record.msg)``. (default: True)

Raises:
    TypeError: If both or neither *processor* and *processors* are passed.

.. versionadded:: 17.1.0
.. versionadded:: 17.2.0 *keep_exc_info* and *keep_stack_info*
.. versionadded:: 19.2.0 *logger*
.. versionadded:: 19.2.0 *pass_foreign_args*
.. versionadded:: 21.3.0 *processors*
.. deprecated:: 21.3.0
   *processor* (singular) in favor of *processors* (plural). Removal is not
   planned.
.. versionadded:: 23.3.0 *use_get_message*
c	                ó4  >• U
R                  SS5      n[        TU ]  " U	SU0U
D6  U(       a  U(       a  Sn[        U5      eU   Ub  U R                  U4U l        OU(       a  X l        OSn[        U5      eX0l        X@l        XPl        X`l	        Xpl
        X€l        g )NÚfmtr0   zBThe `processor` and `processors` arguments are mutually exclusive.z2Either `processor` or `processors` must be passed.)rk  rf   r@  Ú	TypeErrorÚremove_processors_metar6   Úforeign_pre_chainÚkeep_exc_infoÚkeep_stack_infor=  Úpass_foreign_argsÚuse_get_message)rN   Ú	processorr6   r±  r²  r³  r=  r´  rµ  r}   rª  r®  r¿   rj   s                €rB   r@  ÚProcessorFormatter.__init__I  sœ   ø€ ð �j‰j˜ Ó.ˆÜ‰Ò˜$Ð2 CÐ2¨6Ò2æžðð ô ˜C“.Ð áØÑ Ø#×:Ñ:¸IÐFˆD�OÞØ(�OàFˆCÜ˜C“.Ð à!2ÔØ*ÔØ.ÔØŒØ!2ÔØ.ÕrC   c           	     óþ  >• [         R                  " UR                  5      n[        US[        5      n[        USS5      nU[        Lax  US:w  ar  U R
                  b  U R
                  n[        [        UR                  5      n[        [        [        [        4   UR                  5      R                  5       nXS'   SUS'   OúU R
                  nUR                  R                  5       nU R                  (       a  UR!                  5       O[        UR                  5      USS	.nU R"                  (       a  UR$                  US
'   SUl        UR&                  (       a  UR&                  US'   UR(                  (       a  UR(                  US'   U R*                  =(       d    S H  n[        [,        U" X#U5      5      nM     U R.                  (       d  SUl        SUl        U R2                  (       d  SUl        U R4                   H  nU" X#U5      nM     [7        U[        5      (       dG  [8        R:                  " SU R4                  S    S[=        U5       S3[>        SS9  [        [        U5      nXAl        [@        TU ]…  U5      $ )z¨
Extract *structlog*'s `event_dict` from ``record.msg`` and format it.

*record* has been patched by `wrap_for_formatter` first though, so the
 type isn't quite right.
rd   rR   Ú__structlog_sentinel__Nr�  TÚ_from_structlogF)r|   r�  rº  r›   r9   r’   rO   zNThe last processor in ProcessorFormatter.processors must return a string, but r5   z returned a z	 instead.r   )ÚcategoryrH   )"r:   ÚmakeLogRecordrœ  ÚgetattrÚ	_SENTINELr=  r
   r(  rR   r…  r	   r¿   ÚcopyÚ	levelnameÚlowerrµ  Ú
getMessager´  r}   r’   rO   r±  r   r²  Úexc_textr³  r6   r„  Úwarningsr1  ÚtypeÚRuntimeWarningrf   r1   )rN   rÄ   r=  Ú	meth_nameÚedÚprocÚprj   s          €rB   r1   ÚProcessorFormatter.formatp  s  ø€ ô ×&Ò& v§¡Ó7ˆä˜ ¬IÓ6ˆÜ˜F GÐ-EÓFˆ	ð œÒ" yÐ4LÓ'Là�{‰{Ñ&ØŸ™�ÜœS &§,¡,Ó/ˆIô
 ”dœ3¤˜8‘n f§j¡jÓ1×6Ñ6Ó8ˆBØ"ˆy‰MØ$(ˆBÐ Ò!à—[‘[ˆFØ×(Ñ(×.Ñ.Ó0ˆIð ×+×+ð ×%Ñ%Ô'ä˜VŸZ™Z›à!Ø#(ñˆBð ×%×%Ø(.¯©�Ð$Ñ%àˆFŒKð ��Ø!'§¡��:‘Ø× × Ø#)×#4Ñ#4��<Ñ ð ×.Ñ.×4°"Ò4�Üœ)¡T¨&¸RÓ%@ÓA’ñ 5ð ×!×!Ø"ˆFŒOØ"ˆFŒOØ×#×#Ø $ˆFÔà—”ˆAÙ�6 bÓ)ŠBñ !ô ˜"œc×"Ñ"Ü�MŠMð(Ø(,¯©¸Ñ(;Ð'<¸LÜ˜“8�*˜Ið'ô (Øòô ”c˜2“ˆBàŒ
ä‰w‰~˜fÓ%Ð%rC   c                ó   • U4SXS.04$ )a  
Wrap *logger*, *name*, and *event_dict*.

The result is later unpacked by `ProcessorFormatter` when formatting
log entries.

Use this static method as the renderer (in other words, final
processor) if you want to use `ProcessorFormatter` in your `logging`
configuration.
r»   )rd   rR   r9   )r=  r¡   r‡  s      rB   Úwrap_for_formatterÚ%ProcessorFormatter.wrap_for_formatterÂ  s   € ð ˆ}˜w°FÑ(JÐKÐKÐKrC   c                ó   • US	 US	 U$ )z¼
Remove ``_record`` and ``_from_structlog`` from *event_dict*.

These keys are added to the event dictionary, before
`ProcessorFormatter`'s *processors* are run.

.. versionadded:: 21.3.0
r�  rº  r9   )ry  r†  r‡  s      rB   r°  Ú)ProcessorFormatter.remove_processors_metaÒ  s   € ð �yÐ!ØÐ(Ð)àÐrC   )r±  r²  r³  r=  r´  r6   rµ  )Nr9   NFFNFT)r¶  zProcessor | Noner6   úSequence[Processor] | Noner±  rÑ  r²  rX   r³  rX   r=  zlogging.Logger | Noner´  rX   rµ  rX   r}   r	   rª  r	   rZ   r*  )rÄ   r,  rZ   r(  )r=  rc   r¡   r(  r‡  r   rZ   z2tuple[tuple[EventDict], dict[str, dict[str, Any]]]r‰  )r[   r\   r]   r^   r_   r@  r1   ÚstaticmethodrÍ  r°  r`   r3  r4  s   @rB   r%   r%   ò  s  ø† ñTðp '+Ø13Ø8<Ø#Ø %Ø(,Ø"'Ø $ð%/à#ð%/ð /ð%/ð 6ð	%/ð
 ð%/ð ð%/ð &ð%/ð  ð%/ð ð%/ð ð%/ð ð%/ð 
÷%/ð %/÷NP&ðd ðLØðLØ&)ðLØ7@ðLà	;óLó ðLð ðØðØ!ðØ/8ðà	óó örC   r%   )r-   z
int | NonerZ   r*  )r}   r	   r6  r	   rZ   r!   )r=  rc   rœ   r(  r‡  r   rZ   r   )ry  rc   r†  r(  r‡  r   rZ   z&tuple[tuple[Any, ...], dict[str, Any]])ry  rc   r†  r(  r‡  r   rZ   r   )Gr_   Ú
__future__r   rþ   rü   r”  r:   r<   r÷   rÄ  Úcollections.abcr   r   r   r   r   Útypingr	   r
   Úversion_infor   Útyping_extensionsÚ r   Ú_baser   Ú_framesr   r   Ú_log_levelsr   r   r   r   r   r   Ú
exceptionsr   r6   r   r   r   r   r   r   r    Ú__all__ÚNOTSETr*   Úobjectr¾  ÚLoggerrE   r!   r)   r8  r#   r$   r(   r&   r'   Ú	LogRecordrœ  ro   rž  r"   r¨  r+   r,   Ú	Formatterr%   r9   rC   rB   Ú<module>rã     sí  ðñ
õ #ã Û Û Û Û 
Û Û ç DÓ DÝ ß ð ×Ñ�wÓÞå&õ Ý "ß Bß DÑ D÷ñ õ
 "Ý )÷÷ ò€ð" 29·±÷ .ñb ‹H€	ôI˜WŸ^™^ô Iô<EP�/ô EPôP7÷ [
ñ [
÷|-'ñ -'÷`)ñ )ðXØðØ),ðØ:Cðàôð@ØðØ),ðØ:Cðàôð.ØðØ),ðØ:Cðàôð ×$Ò$Ø
ˆAˆz˜1˜e R¨óç
�(�4‰4‹6ð ÷
97ñ 97ðx ;€ðØðØðØ,5ðà+ôð<ØðØðØ,5ðàôô@o˜×*Ñ*õ orC   