%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/python/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/python/__pycache__/log.cpython-312.pyc |
� Ϫ�f�W � � � d Z ddlZddlZddlZddlmZmZ ddlmZmZ ddl m Z mZmZm Z mZ ddlmZ ddlmZmZmZmZmZmZmZmZ ddl m!Z! dd l"m#Z$ dd l%m&Z&m'Z'm(Z(m)Z) ddl*m+Z+ ee,e f Z- G d� d � Z. G d� de� Z/ e&j` e.ddi� d� Z1d� Z2d9d�Z3e3Z4 G d� d� Z G d� d� Z e+e� d e5� vrnd� Z6 eeee�� Z7 e6e7jp � d� � Z8 e6e7jr � d� � Z9 e6e7jt � d� � Z: e6e7jv � d� � Z;d e,d!ee,e f d"e,fd#�Z<d$e-d"e e, fd%�Z= G d&� d'e� Z> G d(� d)e>� Z? G d*� d+e>� Z@ G d,� d-� ZAd.� ZBd:d/�ZC G d0� d1� ZDd2� ZEd3 e5� vrX e e� ej� eGej� d4d� �5� aI e e� ej� eGej� d4d� �5� ZL G d6� d7e>� ZMd8 e5� vr eM� ZNyy);z% Logging and metrics infrastructure. � N)�ABC�abstractmethod)�datetime�timezone)�Any�BinaryIO�Dict�Optional�cast)� Interface)�LegacyLogObserverWrapper�Logger�LoggingFile�LogLevel�LogPublisher�STDLibLogObserver�globalLogBeginner�globalLogPublisher)�LogBeginner)�publishToNewObserver)�context�failure�reflect�util)�synchronizec � � e Zd ZdZy)�ILogContextz� Actually, this interface is just a synonym for the dictionary interface, but it serves as a key for the default information in a log. I do not inherit from C{Interface} because the world is a cruel place. N)�__name__� __module__�__qualname__�__doc__� � �4/usr/lib/python3/dist-packages/twisted/python/log.pyr r % s � �r# r c � � e Zd ZdZdeddfd�Zy)�ILogObserverz� An observer which can do something with log events. Given that most log observers are actually bound methods, it's okay to not explicitly declare provision of this interface. � eventDict�returnNc � � y)a6 Log an event. @param eventDict: A dictionary with arbitrary keys. However, these keys are often available: - C{message}: A C{tuple} of C{str} containing messages to be logged. - C{system}: A C{str} which indicates the "system" which is generating this event. - C{isError}: A C{bool} indicating whether this event represents an error. - C{failure}: A L{failure.Failure} instance - C{why}: Used as header of the traceback in case of errors. - C{format}: A string format used in place of C{message} to customize the event. The intent is for the observer to format a message by doing something like C{format % eventDict}. Nr"