File: //lib/python3.7/logging/__pycache__/handlers.cpython-37.pyc
B
U��eJ� � @ sr d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z m
Z
mZ ddlZddl
Z
dZdZdZdZdZdZd ZG d
d� dej�ZG dd
� d
e�ZG dd� de�ZG dd� dej�ZG dd� dej�ZG dd� de�ZG dd� dej�ZG dd� dej�ZG dd� dej�ZG dd� dej�Z G dd� dej�Z!G d d!� d!e!�Z"G d"d#� d#ej�Z#G d$d%� d%e$�Z%dS )&z�
Additional handlers for the logging package for Python. The core package is
based on PEP 282 and comments thereto in comp.lang.python.
Copyright (C) 2001-2016 Vinay Sajip. All Rights Reserved.
To use, simply 'import logging.handlers' and log away!
� N)�ST_DEV�ST_INO�ST_MTIMEi<# i=# i># i?# i i�Q c @ s2 e Zd ZdZddd�Zdd� Zdd � Zd
d� ZdS )
�BaseRotatingHandlerz�
Base class for handlers that rotate log files at a certain point.
Not meant to be instantiated directly. Instead, use RotatingFileHandler
or TimedRotatingFileHandler.
NFc C s0 t j�| ||||� || _|| _d| _d| _dS )zA
Use the specified filename for streamed logging
N)�logging�FileHandler�__init__�mode�encoding�namer�rotator)�self�filenamer r
�delay� r �&/usr/lib/python3.7/logging/handlers.pyr 2 s
zBaseRotatingHandler.__init__c C sH y$| � |�r| �� tj�| |� W n tk
rB | �|� Y nX dS )z�
Emit a record.
Output the record to the file, catering for rollover as described
in doRollover().
N)�shouldRollover�
doRolloverr r �emit� Exception�handleError)r
�recordr r r r <