관리-도구
편집 파일: logger.cpython-311.opt-1.pyc
� IMg B � � � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlZd dlm Z mZ d dlmZ d dlZd dlZd dlmZmZ d dlmZ d dlmZ d dlmZ d dlmZmZ ej � d d � � Z ej! e"� � Z# G d� dej$ j% � � Z&d!d�Z' G d� d� � Z( ed� � d� � � Z)d� Z*d� Z+d� Z,d� Z-d� Z.d� Z/d� Z0d� Z1d� Z2d� Z3d� Z4e d� � � Z5 G d� d � � Z6dS )"� N)�contextmanager�suppress)� lru_cache)�config�sentry)� AcronisBackup)�Logger)�Sentry)�antivirus_mode�is_root_user�IMUNIFY360_LOGGING_PREFIX� c �$ � � e Zd Z� fd�Zd� Z� xZS )�RotatingCompressionFileHandlerc �� �� t � � � |� � S # t $ r7 | � � � | _ t � d� � Y dS w xY w)Nz-Failed on shouldRollover to rollover log fileF)�super�shouldRollover� Exception�_open�stream�logger� exception)�self�record� __class__s ��U/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/internals/logger.pyr z-RotatingCompressionFileHandler.shouldRollover sf �� � ��7�7�)�)�&�1�1�1��� � � ��*�*�,�,�D�K����L�M�M�M��5�5� ���s � $ �=A%�$A%c � � | j r| j � � � | j dk �r� t | j dz dd� � D ]�}d| j |fz }d| j |dz fz }t j � |� � rHt j � |� � rt j |� � t j ||� � ��| j dz }t j � |� � rt j |� � t j | j |� � t j | j d� � t |d� � 5 }t j d|z d� � 5 }t j ||� � d d d � � n# 1 swxY w Y d d d � � n# 1 swxY w Y t j |� � n*# t $ r t"