%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/logger/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/logger/__pycache__/_io.cpython-312.pyc |
� Ϫ�f� � �t � d Z ddlZddlmZmZmZ ddlmZ ddlm Z ddl mZ ddlm Z dd lmZ G d � d� Zy)z File-like object that logs. � N)�AnyStr�Iterable�Optional)� NamedConstant)�Version)�deprecatedProperty� )�LogLevel)�Loggerc � � e Zd ZdZdZ e edddd� � d� � Zej d� � Ze j dfd ed ede e ddfd �Zedefd�� Zedefd�� Zedefd�� Zedd�� Zedefd�� Zdd�Zdd�Zdefd�Zdefd�Zdeddfd�Zdee ddfd�Zde ddfd�Z!e!Z"e!Z#e!Z$e!Z%e!Z&e!Z'e!Z(e!Z)y)�LoggingFileac File-like object that turns C{write()} calls into logging events. Note that because event formats are L{str}, C{bytes} received via C{write()} are converted to C{str}, which is the opposite of what C{file} does. @ivar softspace: Attribute to make this class more file-like under Python 2; value is zero or one. Do not use. r �Twisted� � c � � | j S �N�� _softspace��selfs �4/usr/lib/python3/dist-packages/twisted/logger/_io.py� softspacezLoggingFile.softspace! s � ����� c � � || _ y r r )r �values r r zLoggingFile.softspace% s � ���r N�logger�level�encoding�returnc � � || _ || _ |�t j � | _ n|| _ d| _ d| _ y)a @param logger: the logger to log through. @param level: the log level to emit events with. @param encoding: The encoding to expect when receiving bytes via C{write()}. If L{None}, use C{sys.getdefaultencoding()}. N� F)r �log�sys�getdefaultencoding� _encoding�_buffer�_closed)r r r r s r �__init__zLoggingFile.__init__) s= � � �� ������ �3�3�5�D�N�%�D�N������r c � � | j S )zm Read-only property. Is the file closed? @return: true if closed, otherwise false. �r'