Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyc

ó
“tÆ_c@@s=ddlmZddlZddlZddlZddlZddlZddlZddlmZm	Z	ddl
mZddlm
Z
ddlmZddlmZyddlZWnek
rÝddlZnXyddlmZWnek
rdZnXdd	lmZeZejƒZe	d
ƒZdefd„ƒYZe
rterhd
„Z qd„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__(((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyR	:scC@s%|tko$|jtjtjfkS(s1See the docstring for non-Windows Python 3 below.(tIOErrorterrnotEINVALtEPIPE(t	exc_classtexc((sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyRNscC@s|tko|jtjkS(s1See the docstring for non-Windows Python 3 below.(R
RR(RR((sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyt
indent_logds
	cC@sttddƒS(NRi(tgetattrR(((sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyR.“s
	&(R
RR!R,R.(((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyRws	
	c@s‡fd†}|S(Nc@s#djtˆƒ|tjjgƒS(NR%(R1tlistRtStylet	RESET_ALL(tinp(tcolors(sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pytwrappedªs((R=R>((R=sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/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"((sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyRXís
N(R
RRR&R)R?RtREDR'tYELLOWRStNoneR!RHRRR.RX(((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyR@¯s	
		tBetterRotatingFileHandlercB@seZd„ZRS(cC@s,ttjj|jƒƒtjjj|ƒS(N(	RRNtpathtdirnametbaseFilenameR&thandlerstRotatingFileHandlert_open(R"((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyRbüs(R
RRb(((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyR\ústMaxLevelFiltercB@seZd„Zd„ZRS(cC@s
||_dS(N(RU(R"RU((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyR!scC@s|j|jkS(N(R+RU(R"R4((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pytfilters(R
RR!Rd(((sL/opt/alt/python35/lib/python3.5/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((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyRds(R
RRRd(((sL/opt/alt/python35/lib/python3.5/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(sINFOsERROR(RR&R[tconfigt
dictConfigRR'tsubprocess_loggerRrRR3(t	verbosityREt
user_log_fileRUtlevel_numbertinclude_user_logtadditional_log_filet
root_leveltvendored_log_leveltlog_streamsthandler_classesR`((sL/opt/alt/python35/lib/python3.5/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.coloramaRtlocalRRR	RtcontextmanagerRRt	FormatterRR?RAR@R`RaR\RcReR‹(((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/logging.pyt<module>sR



				2	K	
Back to Directory File Manager