0x1949 Team - FAZEMRX - MANAGER
Edit File: logging.cpython-310.pyc
o ���c� � @ sZ d dl mZ d dlZd dlZd dlZd dlZdZddd�Zddd �Zdd d�Z dd � Z dS )� )�absolute_importNz;%(asctime)s %(levelname)-8s [%(threadName)-10s] %(message)s�infoc C sR | j dddddd� d}|r|d�|�7 }| j d d d||d� | j d |dd� dS )z?Add common logging-related CLI options to the given arg parser.z-qz--quietF� store_truez"Do not log to the standard output.)�default�action�helpz)The directory in which to write log filesz (default: {!r}).z-lz --log-dir�FILE)�metavarr r z--log-levelz/One of debug, info, warning, error or critical.)r r N)� add_option�format)�parser�level�logdir� logdirhelp� r �7/usr/lib/python3/dist-packages/landscape/lib/logging.py�add_cli_options s �� �r Fc C sV |du r t j�tjd �}t�|�� �}tt� � || |t� t�|s$tjnd� t� � S )z3Given a log dir, set up logging for an application.Nr ) �os�path�basename�sys�argv�logging�getLevelName�upper� _init_logging� getLogger� Formatter�FORMAT�stdout)r r �progname�quietr r r �init_app_logging s �r"