Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/tornado/__pycache__/log.cpython-39.pyc
Ðазад
a _�h�1 � @ s d Z ddlZddlZddlZddlmZ ddlmZmZ zddl Z W n e yZ dZ Y n0 zddlZW n e y~ dZY n0 ddlm Z mZmZ e�d�Ze�d�Ze�d�Zed �d d�Zeed�d d�ZG dd� dej�Zdeejdd�dd�Zdedd�dd�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�castztornado.accessztornado.applicationztornado.general)�returnc C st z\t tjd�rZtj�� rZtr:t�� t�d�dkrZW dS n trZtjttj dt � �u rZW dS W n tyn Y n0 dS )N�isatty�colorsr TZwrapped_stderrF)�hasattr�sys�stderrr �cursesZ setuptermZtigetnum�colorama�getattrZ initialise�object� Exception� r r �{/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/tornado/log.py�_stderr_supports_color7 s � r )�sr c C s* z t | �W S ty$ t| � Y S 0 d S �N)r �UnicodeDecodeError�repr)r r r r � _safe_unicodeJ s r c @ sp e Zd ZdZdZdZejdejdej dej diZeedd efeeee eeef d d�dd �Zeed�dd�Zd S )�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� � � � �%TN)�fmt�datefmt�style�colorr r c C s� t jj| |d� || _i | _|r�t� r�tdur�t�d�pDt�d�pDd}|�� D ] \}}t t� ||�d�| j|<