Your IP : 52.14.26.141


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyc

�
�Rec@@s=ddlmZddlZddlZddlZddlZddlZddlZddlmZm	Z	ddl
mZddlm
Z
ddlmZddlmZyddlZWnek
r�ddlZnXyddlmZWnek
rdZnXdd	lmZeZej�Ze	d
�Zdefd��YZe
rterhd
�Z q�d�Z ner�d�Z n	d�Z ej!dd��Z"d�Z#dej$fd��YZ%d�Z&dej'fd��YZ(dej)j*fd��YZ+defd��YZ,defd��YZ-d�Z.dS( i(tabsolute_importN(tFiltert	getLogger(tPY2(tWINDOWS(tDEPRECATION_MSG_PREFIX(t
ensure_dir(tcolorama(tForespip.subprocessortBrokenStdoutLoggingErrorcB@seZdZRS(sO
    Raised if BrokenPipeError occurs for the stdout stream while logging.
    (t__name__t
__module__t__doc__(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyR	:scC@s%|tko$|jtjtjfkS(s1See the docstring for non-Windows Python 3 below.(tIOErrorterrnotEINVALtEPIPE(t	exc_classtexc((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyt_is_broken_pipe_errorHscC@s1|tkp0|tko0|jtjtjfkS(s1See the docstring for non-Windows Python 3 below.(tBrokenPipeErrortOSErrorRRR(RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyRNscC@s|tko|jtjkS(s1See the docstring for non-Windows Python 3 below.(R
RR(RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyRTscC@s
|tkS(s�
        Return whether an exception is a broken pipe error.

        Args:
          exc_class: an exception class.
          exc: an exception instance.
        (R(RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyRYsicc@s;t�t_tj|7_z	dVWdtj|8_XdS(sv
    A context manager which will cause the log output to be indented for any
    log messages emitted inside it.
    N(tget_indentationt
_log_statetindentation(tnum((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyt
indent_logds
	cC@sttdd�S(NRi(tgetattrR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyRsstIndentingFormattercB@s#eZd�Zd�Zd�ZRS(cO@s2|jdt�|_tt|�j||�dS(s�
        A logging.Formatter that obeys the indent_log() context manager.

        :param add_timestamp: A bool indicating output lines should be prefixed
            with their record's timestamp.
        t
add_timestampN(tpoptFalseRtsuperRt__init__(tselftargstkwargs((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyR!yscC@s=|tjkrdS|jt�r&dS|tjkr9dSdS(sv
        Return the start of the formatted log message (not counting the
        prefix to add to each line).
        ts	WARNING: sERROR: (tloggingtWARNINGt
startswithRtERROR(R"t	formattedtlevelno((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pytget_message_start�scC@s�tt|�j|�}|j||j�}||}d}|jrm|j|d�}djt��}n|dt�7}dj	g|j
t�D]}||^q��}|S(s�
        Calls the standard formatter, but will indent all of the log message
        lines by our current indentation level.
        R%s%Y-%m-%dT%H:%M:%Ss{t},{record.msecs:03.0f} t (R RtformatR,R+Rt
formatTimetlocalsRtjoint
splitlinestTrue(R"trecordR*t
message_starttprefixtttline((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyR.�s
	&(R
RR!R,R.(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyRws	
	c@s�fd�}|S(Nc@s#djt��|tjjg�S(NR%(R1tlistRtStylet	RESET_ALL(tinp(tcolors(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pytwrapped�s((R=R>((R=s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyt_color_wrap�stColorizedStreamHandlercB@szeZer?ejeej�fejeej	�fgZ
ngZ
ddd�Zd�Z
d�Zd�Zd�ZRS(cC@sDtjj||�||_tr@tr@tj|j�|_ndS(N(R&t
StreamHandlerR!t	_no_colorRRtAnsiToWin32tstream(R"RDtno_color((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyR!�s	cC@s/trtr|jjtjkS|jtjkS(sA
        Return whether the handler is using sys.stdout.
        (RRRDR>tsyststdout(R"((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyt
_using_stdout�scC@s}ts|jrtSt|jtj�s2|jn	|jj}t|d�r]|j�r]t	St
jjd�dkryt	StS(NtisattytTERMtANSI(
RRBRt
isinstanceRDRCR>thasattrRIR3tostenvirontget(R"treal_stream((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pytshould_color�scC@satjj||�}|j�r]x9|jD]+\}}|j|kr+||�}Pq+q+Wn|S(N(R&RAR.RRtCOLORSR+(R"R4tmsgtleveltcolor((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyR.�scC@sYtj�d \}}|rC|j�rCt||�rCt��ntt|�j|�S(Ni(RFtexc_infoRHRR	R R@thandleError(R"R4RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyRX�s
N(R
RRR&R)R?RtREDR'tYELLOWRStNoneR!RHRRR.RX(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyR@�s	
		tBetterRotatingFileHandlercB@seZd�ZRS(cC@s,ttjj|j��tjjj|�S(N(	RRNtpathtdirnametbaseFilenameR&thandlerstRotatingFileHandlert_open(R"((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyRb�s(R
RRb(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyR\�stMaxLevelFiltercB@seZd�Zd�ZRS(cC@s
||_dS(N(RU(R"RU((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyR!scC@s|j|jkS(N(R+RU(R"R4((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pytfilters(R
RR!Rd(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyRcs	tExcludeLoggerFiltercB@seZdZd�ZRS(sQ
    A logging Filter that excludes records from a logger (or its children).
    cC@stt|�j|�S(N(R ReRd(R"R4((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyRds(R
RRRd(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyRe
scC@s�|dkrd}nE|dkr*d}n0|dkr?d}n|dkrTd}nd	}tt|�}|d2k	}|r�|}d}nd
}|}|d3kr�dnd}idd6d
d6}	idd6dd6}
dddg|r�dgng}tjjidd6td6iidd6tjd6d6idd6tjd6d6id d6tjd6d!6d"6iit	d6d#d$6d%6it	d6d#d$6t
d&6d'6d(6ii|d6|
dd)6|d*6|	dd6d!dgd"6d%d+6d6idd6|
dd)6|d*6|	dd6d!gd"6d%d+6d6i|d6|
dd)6|d*6|	dd6dgd"6d%d+6d6idd6|
dd)6|d,6t
d-6d'd+6d6d.6i|d6|d.6d/6ii|d6d06d16�|S(4snConfigures and sets up all of the logging

    Returns the requested logging level, as its integer value.
    itDEBUGi����R'i����R)i����tCRITICALtINFOs	/dev/nullsext://sys.stdoutRGsext://sys.stderrtstderrs2pip._internal.utils.logging.ColorizedStreamHandlerRDs5pip._internal.utils.logging.BetterRotatingFileHandlertfiletconsoletconsole_errorstconsole_subprocesstuser_logtversiontdisable_existing_loggerss*pip._internal.utils.logging.MaxLevelFilters()RUtexclude_warningsslogging.Filtertnametrestrict_to_subprocesss/pip._internal.utils.logging.ExcludeLoggerFiltertexclude_subprocesstfilterss%(message)sR.tindentRtindent_with_timestampt
formatterstclassREt	formattertfilenametdelayR`trootspip._vendortloggersN(RhR)(RR&R[tconfigt
dictConfigRR'tsubprocess_loggerRrRR3(t	verbosityREt
user_log_fileRUtlevel_numbertinclude_user_logtadditional_log_filet
root_leveltvendored_log_leveltlog_streamsthandler_classesR`((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyt
setup_loggings�					




(/t
__future__Rt
contextlibRR&tlogging.handlersRNRFRRtpip._vendor.sixRtpip._internal.utils.compatRtpip._internal.utils.deprecationRtpip._internal.utils.miscRt	threadingtImportErrortdummy_threadingtpip._vendorRt	_coloramat	ExceptionR[tpip._vendor.coloramaRtlocalRR�R	RtcontextmanagerRRt	FormatterRR?RAR@R`RaR\RcReR�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/logging.pyt<module>sR



				2	K	

?>