File: //usr/local/lib/python3.9/site-packages/celery/app/__pycache__/log.cpython-39.pyc
a
X>h�# � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZmZ ddlmZ dd lmZ dd
lmZmZmZmZmZmZ ddlmZ ddlmZ d
Zej �!dd�Z"G dd� de�Z#G dd� d�Z$dS )z�Logging configuration.
The Celery instances logging section: ``Celery.log``.
Sets up logging for the worker and other programs,
redirects standard outs, colors log output, patches logging
related compatibility fixes, and so on.
� N)�WatchedFileHandler)�set_default_encoding_file)�signals)�get_current_task)�CDeprecationWarning�CPendingDeprecationWarning)�class_property)�isatty)�ColorFormatter�LoggingProxy�
get_logger�get_multiprocessing_logger�mlevel�reset_multiprocessing_logger)�node_format)�colored)�
TaskFormatter�Logging�MP_LOGFc s e Zd ZdZ� fdd�Z� ZS )r z1Formatter for tasks, adding the task name and id.c sP t � }|r(|jr(|jj|jj|jd� n|j�dd� |j�dd� t� �|�S )N)�task_id� task_namer z???r ) r �request�__dict__�update�id�name�
setdefault�super�format)�self�record�task�� __class__� �8/usr/local/lib/python3.9/site-packages/celery/app/log.pyr # s
�zTaskFormatter.format)�__name__�
__module__�__qualname__�__doc__r �
__classcell__r$ r$ r"