%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core/17212/usr/lib/python3/dist-packages/cloudinit/__pycache__/
Upload File :
Create Path :
Current File : //snap/core/17212/usr/lib/python3/dist-packages/cloudinit/__pycache__/log.cpython-35.pyc



"�T`U�@sddlZddlZddlZddlZddlZddlZddlZddlZejZej	Z	ej
Z
ejZejZej
Z
ejZejZdZejej_eddd�Zdd�Zddd�Zd	d
d�Zdd
�Zdd�Ze�dS)�Nz6%(asctime)s - %(filename)s[%(levelname)s]: %(message)scCs�|stjt�}tj�}xU|jD]J}t|d�r+t|jd�r+|jjdkr+|j|�dSq+Wtj	t
j�}|j|�|j|�|j
|�|j|�dS)N�stream�namez<stderr>)�logging�	Formatter�DEF_CON_FORMAT�	getLogger�handlers�hasattrrr�setLevel�
StreamHandler�sys�stderrZsetFormatter�
addHandler)�levelZ	formatter�rootZhandlerZconsole�r�//usr/lib/python3/dist-packages/cloudinit/log.py�setupBasicLogging%s!



rcCsd|s
dSxF|jD];}t|tj�ry|j�Wqtk
rNYqXqWt|j�dS)N)r�
isinstancerr�flush�IOError�flushLoggers�parent)r�hrrrr6s
	rcCs�|si}g}|jd�}|rLt|t�rL|jt|��n�d|kr�x�|dD]v}t|t�r�|j|�qct|tj�r�dd�|D�}|jdj|��qc|jt|��qcWd}xx|D]p}yU|d7}|jd�r!tj	j
|�r!ntj|�}t
jj|�dSWq�tk
rYYq�Xq�W|jd	d
�}tjjd|�|r�tjjd�t�dS)
NZlogcfg�log_cfgscSsg|]}t|��qSr)�str)�.0�crrr�
<listcomp>Rs	z setupLogging.<locals>.<listcomp>�
r��/Z	log_basicTz0WARN: no logging configured! (tried %s configs)
zSetting up basic logging...
)�getrr�append�collections�Iterable�join�
startswith�os�path�isfile�io�StringIOr�configZ
fileConfig�	Exceptionrr
�writer)ZcfgrZlog_cfgZa_cfgZcfg_strZam_triedZ
basic_enabledrrr�setupLoggingBs>

!
	r0Z	cloudinitcCs
tj|�S)N)rr)rrrrrysrcCso|s
dSt|j�}x/|D]'}|j�|j�|j|�q W|jt�|jtj	��dS)z�Remove all current handlers, unset log level and add a NullHandler.

    (Adding the NullHandler avoids "No handlers could be found for logger XXX"
    messages.)
    N)
�listrr�closeZ
removeHandlerr
�NOTSETrrZNullHandler)�logrrrrr�_resetLogger}s



r5cCs!ttj��tt��dS)N)r5rrrrrr�resetLogging�sr6)r$r+rZlogging.configZlogging.handlersr(rZtimeZCRITICALZFATALZERRORZWARNINGZWARN�INFO�DEBUGr3rZgmtimerZ	converterrrr0rr5r6rrrr�<module>s0								7

Zerion Mini Shell 1.0