
    "hd                    N    d Z ddlmZ ddlmZ ddlmZ ddlmZ  G d de      Z	y)	z.
Generic bound logger that can wrap anything.
    )annotations)partial)Any)BoundLoggerBasec                  (    e Zd ZdZddZddZddZy)	BoundLoggera  
    A generic BoundLogger that can wrap anything.

    Every unknown method will be passed to the wrapped *logger*. If that's too
    much magic for you, try `structlog.stdlib.BoundLogger` or
    `structlog.twisted.BoundLogger` which also take advantage of knowing the
    wrapped class which generally results in better performance.

    Not intended to be instantiated by yourself.  See
    :func:`~structlog.wrap_logger` and :func:`~structlog.get_logger`.
    c                X    |dk(  ryt        | j                  |      }t        | ||       |S )zX
        If not done so yet, wrap the desired logger method & cache the result.
        __deepcopy__N)r   _proxy_to_loggersetattr)selfmethod_namewrappeds      O/var/www/html/sandstorm/venv/lib/python3.12/site-packages/structlog/_generic.py__getattr__zBoundLogger.__getattr__   s2     .($//=k7+    c                    | j                   S )=
        Our __getattr__ magic makes this necessary.
        )__dict__)r   s    r   __getstate__zBoundLogger.__getstate__+   s     }}r   c                N    |j                         D ]  \  }}t        | ||        y)r   N)itemsr   )r   statekvs       r   __setstate__zBoundLogger.__setstate__1   s)     KKM 	 DAqD!Q	 r   N)r   strreturnr   )r   dict[str, Any])r   r   r   None)__name__
__module____qualname____doc__r   r   r    r   r   r   r      s    

 r   r   N)
r$   
__future__r   	functoolsr   typingr   structlog._baser   r   r%   r   r   <module>r*      s$    #   +$ / $ r   