| Server IP : 54.37.205.81 / Your IP : 216.73.216.76 Web Server : nginx/1.22.1 System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64 User : debian ( 1000) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/tornado/test/__pycache__/ |
Upload File : |
�
��b% � �< � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
mZ d dlm
Z
mZmZ d dlmZ d dlmZ e j d� � � Z G d� dej � � Z G d � d
e� � Z G d� dej � � Z G d
� dej � � ZdS )� N)�utf8)�LogFormatter�define_logging_options�enable_pretty_logging)�OptionParser)�basestring_typec # � K � t j � � 5 t j dt �� � d V � d d d � � d S # 1 swxY w Y d S )N�ignore)�category)�warnings�catch_warnings�simplefilter�BytesWarning� � �7/usr/lib/python3/dist-packages/tornado/test/log_test.py�ignore_bytes_warningr s� � � � � � � "� "� � ���h��>�>�>�>�
����� � � � � � � � � � � ���� � � � � � s � A�A�
Ac �^ � e Zd Z ej d� � Zd� Zd� Zd� Zd� Z d� Z
d� Zd� Zd � Z
d
S )�LogFormatterTestsD (?s)\[E [0-9]{6} [0-9]{2}:[0-9]{2}:[0-9]{2} log_test:[0-9]+\] (.*)c � � t d�� � | _ t j di| j _ d| j _ t j d� � | _ d| j _ t j
� � | _ t j
� | j d� � | _ | � | j � � | _ | j � | j � � | j � | j � � d S )NF)�color��r zlog.out)r � formatter�logging�ERROR�_colors�_normal�Logger�logger� propagate�tempfile�mkdtemp�tempdir�os�path�join�filename�make_handler�handler�setFormatter�
addHandler��selfs r �setUpzLogFormatterTest.setUp. s� � �%�E�2�2�2���
#*�-��!;����!*�����n�%7�8�8��� %�����'�)�)�������T�\�9�=�=��
��(�(���7�7�����!�!�$�.�1�1�1�����t�|�,�,�,�,�,r c � � | j � � � t j | j � � t j | j � � d S �N)r* �closer% �unlinkr( �rmdirr$ r- s r �tearDownzLogFormatterTest.tearDown? s@ � ��������
� �$�-� � � �
��������r c �* � t j |� � S r1 �r �FileHandler�r. r( s r r) zLogFormatterTest.make_handlerD s � �
�"�8�,�,�,r c �< � t | j d� � 5 }|� � � � � � }t j � |� � }|r!|� d� � cd d d � � S t d|z � � �# 1 swxY w Y d S )N�rb� zoutput didn't match regex: %r) �openr( �read�stripr �LINE_RE�match�group� Exception)r. �f�line�ms r �
get_outputzLogFormatterTest.get_outputK s� � �
�$�-��
&�
&� H�!��6�6�8�8�>�>�#�#�D� �(�.�.�t�4�4�A��
H��w�w�q�z�z� H� H� H� H� H� H� H� H� � ?�$� F�G�G�G�
H� H� H� H���� H� H� H� H� H� Hs �AB�?B�B�Bc � � | j � d� � | � | � � � d� � d S )N�foos foo)r �error�assertEqualrG r- s r �test_basic_loggingz#LogFormatterTest.test_basic_loggingT s>