| 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 : /usr/lib/python3/dist-packages/tornado/__pycache__/ |
Upload File : |
�
��b1 � � � d Z ddlZddlZddlZddlmZ ddlmZmZ ddl Z n
# e
$ r dZ Y nw xY w ddlZn
# e
$ r dZY nw xY wddlm
Z
mZmZmZ ej d� � Z ej d� � Z ej d� � Zd efd
�Zded efd�Z G d
� dej � � Z ddedeej d dfd�Zdded dfd�ZdS )aH Logging support for Tornado.
Tornado uses three logger streams:
* ``tornado.access``: Per-request logging for Tornado's HTTP servers (and
potentially other servers in the future)
* ``tornado.application``: Logging of errors from application code (i.e.
uncaught exceptions from callbacks)
* ``tornado.general``: General-purpose logging, including any errors
or warnings from Tornado itself.
These streams may be configured independently using the standard library's
`logging` module. For example, you may wish to send ``tornado.access`` logs
to a separate file for analysis.
� N)�_unicode)�unicode_type�basestring_type)�Dict�Any�cast�Optionalztornado.accessztornado.applicationztornado.general�returnc �| � t t j d� � r�t j � � � rqt r.t j � � t j d� � dk rdS n<t r5t j t t j dt � � � � u rdS n# t $ r Y nw xY wdS )N�isatty�colorsr T�wrapped_stderrF)�hasattr�sys�stderrr �curses� setupterm�tigetnum�colorama�getattr�
initialise�object� Exception� � �-/usr/lib/python3/dist-packages/tornado/log.py�_stderr_supports_colorr 7 s� � �
��3�:�x�(�(� �S�Z�->�->�-@�-@� ��
�� �"�"�"��?�8�,�,�q�0�0��4� 1��
��:���'�)9�6�8�8�"� "� � � �4����
�
�
�
��
���� �5s �A*B, �.;B, �,
B9�8B9�sc �` � t | � � S # t $ r t | � � cY S w xY w�N)r �UnicodeDecodeError�repr)r s r �
_safe_unicoder# J s= � ����{�{���� � � ��A�w�w�������s � �-�-c
� � e Zd ZdZdZdZej dej dej dej
dej diZeed d
efde
de
d
e
dedeeef ddfd�Zdede
fd�ZdS )�LogFormatterap Log formatter used in Tornado.
Key features of this formatter are:
* Color support when logging to a terminal that supports it.
* Timestamps on every log line.
* Robust against str/bytes encoding problems.
This formatter is enabled automatically by
`tornado.options.parse_command_line` or `tornado.options.parse_config_file`
(unless ``--logging=none`` is used).
Color support on Windows versions that do not support ANSI color codes is
enabled by use of the colorama__ library. Applications that wish to use
this must first initialize colorama with a call to ``colorama.init``.
See the colorama documentation for details.
__ https://pypi.python.org/pypi/colorama
.. versionchanged:: 4.5
Added support for ``colorama``. Changed the constructor
signature to be compatible with `logging.config.dictConfig`.
zV%(color)s[%(levelname)1.1s %(asctime)s %(module)s:%(lineno)d]%(end_color)s %(message)sz%y%m%d %H:%M:%S� � � � � �%T�fmt�datefmt�style�colorr
r
Nc �J � t j � | |�� � || _ i | _ |r�t � � r�t ��t
j d� � pt
j d� � pd}|� � � D ]0\ }}t t
j
||� � d� � | j |<