config root man

Current Path : /usr/local/lib/python2.5/test/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/test/test_logging.pyc

³ò
h”Rc@s>dZddkZddkZddkZddkZddkZddkZddkZddkZddk	Z	ddk
Z
ddkZddkZddk
Z
ddkZ
ddkZ
ddklZdZdZdZddklZlZdefd	„ƒYZeiƒZd
efd„ƒYZd„Zd
ad„Zd„ZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)e*e)e dƒZ+hde <de!<de"<de#<de$<de%<de&<d e'<d!e(<d"e)<Z,d#e
i-fd$„ƒYZ.d%e.fd&„ƒYZ/d'e
i-fd(„ƒYZ0d)„Z1d*Z2d+„Z3d,Z4d-„Z5d.Z6d/„Z7d0„Z8d1Z9d2Z:ei;e:d3d4ƒZ<ei;e:d5d6ƒZ=d7„Z>d8Z?d9e
i@fd:„ƒYZAd;„ZBd<„ZCd=„ZDed>d?ƒd@„ƒZEeFdAjoeiGiHdBƒeEƒndS(CsoTest harness for the logging module. Run all tests.

Copyright (C) 2001-2002 Vinay Sajip. All Rights Reserved.
iÿÿÿÿN(trun_with_localesB-- %-10s %-6s ---------------------------------------------------
sHFinish up, it's closing time. Messages should bear numbers 0 through 24.i
(tThreadingTCPServertStreamRequestHandlertLogRecordStreamHandlercBs)eZdZd„Zd„Zd„ZRS(sˆ
    Handler for a streaming logging request. It basically logs the record
    using whatever logging policy is configured locally.
    cCsÓxÌy¼|iidƒ}t|ƒdjoPntid|ƒd}|ii|ƒ}x8t|ƒ|jo$||ii|t|ƒƒ}q[W|i|ƒ}ti|ƒ}|i|ƒWq‚qXqdS(sÑ
        Handle multiple requests - each expected to be a 4-byte length,
        followed by the LogRecord in pickle format. Logs the record
        according to whatever policy is configured locally.
        is>LiN(	t
connectiontrecvtlentstructtunpacktunPickletloggingt
makeLogRecordthandleLogRecord(tselftchunktslentobjtrecord((s-/usr/local/lib/python2.5/test/test_logging.pythandle3s%cCs
ti|ƒS(N(tcPickletloads(R
tdata((s-/usr/local/lib/python2.5/test/test_logging.pyR	HscCsed|i}|itjod|i_n|id|d|_ti|ƒ}|i|ƒdS(Nslogrecv.tcp.is (via t)(tnametmsgt	FINISH_UPtservertabortR
t	getLoggerR(R
Rtlognametlogger((s-/usr/local/lib/python2.5/test/test_logging.pyRKs
(t__name__t
__module__t__doc__RR	R(((s-/usr/local/lib/python2.5/test/test_logging.pyR-s		tLogRecordSocketReceivercBs>eZdZdZdeiied„Zd„Z	d„Z
RS(s[
    A simple-minded TCP socket-based logging receiver suitable for test
    purposes.
    it	localhostcCs/ti|||f|ƒd|_d|_dS(Nii(Rt__init__Rttimeout(R
thosttportthandler((s-/usr/local/lib/python2.5/test/test_logging.pyR$_s	cCsoxT|ipIti|iiƒggg|iƒ\}}}|o|iƒqqWtiƒ|iƒdS(N(	RtselecttsockettfilenoR%thandle_requesttsocketDataProcessedtsettserver_close(R
trdtwrtex((s-/usr/local/lib/python2.5/test/test_logging.pytserve_until_stoppedfs

cCs/tid|id||fƒ}|iƒdS(Nttargettargs(t	threadingtThreadtfinish_requesttstart(R
trequesttclient_addresstt((s-/usr/local/lib/python2.5/test/test_logging.pytprocess_requestqs(RR R!tallow_reuse_addressR
thandlerstDEFAULT_TCP_LOGGING_PORTRR$R3R=(((s-/usr/local/lib/python2.5/test/test_logging.pyR"Ws		cCs|iƒdS(N(R3(t	tcpserver((s-/usr/local/lib/python2.5/test/test_logging.pytrunTCPwsicCsdt}tda|S(Ns
Message %di(tmsgcount(trv((s-/usr/local/lib/python2.5/test/test_logging.pytnextmessage€s

c	CsNtidƒ}|itiƒtidƒ}|itiƒtidƒ}|itiƒtidƒ}|itiƒtidƒ}tidƒ}tidƒ}tidƒ}tid	ƒ}|ititƒƒ|i	tƒƒ|ititƒƒ|i	tƒƒ|i
tƒƒ|itƒƒ|ititƒƒ|i	tƒƒ|i
tƒƒ|itƒƒ|ititƒƒ|i	tƒƒ|ititƒƒ|i	tƒƒ|ititƒƒ|i	tƒƒ|i
tƒƒ|itƒƒ|itƒƒ|ititƒƒ|i	tƒƒ|i
tƒƒ|itƒƒ|ititƒƒ|ititƒƒ|i
tƒƒ|itƒƒ|itƒƒ|itƒƒ|itƒƒ|i
tƒƒ|itƒƒ|itƒƒ|i
tƒƒ|itƒƒ|itƒƒ|it
ƒdS(
NtERRtINFsINF.ERRtDEBs	INF.UNDEFs
INF.ERR.UNDEFtUNDEFsINF.BADPARENT.UNDEFs
INF.BADPARENT(R
RtsetLeveltERRORtINFOtDEBUGtlogtFATALREterrortwarntinfotdebugR(	RFRGtINF_ERRRHt	INF_UNDEFt
INF_ERR_UNDEFRIt
GRANDCHILDtCHILD((s-/usr/local/lib/python2.5/test/test_logging.pyttest0†sdi	iiiiiiiitSilenttTaciturntTersetEffusivetSociabletVerboset	Talkativet	Garruloust
ChatterboxtBoringtSpecificLevelFiltercBseZd„Zd„ZRS(cCs
||_dS(N(tlevel(R
tlvl((s-/usr/local/lib/python2.5/test/test_logging.pyR$úscCs|i|ijS(N(Retlevelno(R
R((s-/usr/local/lib/python2.5/test/test_logging.pytfilterýs(RR R$Rh(((s-/usr/local/lib/python2.5/test/test_logging.pyRdùs	tGarrulousFiltercBseZd„ZRS(cCsti|tƒdS(N(RdR$t	GARRULOUS(R
((s-/usr/local/lib/python2.5/test/test_logging.pyR$s(RR R$(((s-/usr/local/lib/python2.5/test/test_logging.pyRistVerySpecificFiltercBseZd„ZRS(cCs|ittgjS(N(RgtSOCIABLEtTACITURN(R
R((s-/usr/local/lib/python2.5/test/test_logging.pyRh
s(RR Rh(((s-/usr/local/lib/python2.5/test/test_logging.pyRk	scCstiid|ƒdS(Ns%s
(tsyststdouttwrite(ts((s-/usr/local/lib/python2.5/test/test_logging.pytmessage
ss=This should only be seen at the '%s' logging level (or lower)c
Csáx(tiƒD]}ti|t|ƒq
Wd„}tidƒ}|id}x<tD]4}tdti|ƒƒ|i	|ƒ||ƒqWW|i	t
ƒtdƒx<tD]4}tdti|ƒƒ|i	|ƒ||ƒq­W|i	dƒtƒ}|i|ƒtdƒx<tD]4}tdti|ƒƒ|i	|ƒ||ƒqWt
ƒ}|i|ƒtdƒx<tD]4}tdti|ƒƒ|i	|ƒ||ƒqxW|i|ƒ|i|ƒtitidƒdS(	NcSs1x*tD]"}|i|tti|ƒƒqWdS(N(tLEVEL_RANGERNtSHOULD1R
tgetLevelName(RNRf((s-/usr/local/lib/python2.5/test/test_logging.pytdoLogstis&-- setting logging level to '%s' -----s,-- Filtering at handler level to SOCIABLE --s&-- Filtering using GARRULOUS filter --s<-- Filtering using specific filter for SOCIABLE, TACITURN --RM(tmy_logging_levelstkeysR
taddLevelNameRR?RsRrRuRJRlRit	addFilterRktremoveFilterRM(RfRvRNthdlrtgarrtspec((s-/usr/local/lib/python2.5/test/test_logging.pyttest1sT
	





	


	




sA-- logging %d at INFO, messages should be seen every 10 events --cCs
tidƒ}|id}|iƒ|i|ƒtiidti|ƒ}|itiƒ|i	|ƒt
dƒ|idƒt
dƒ|idƒt
dƒ|i
d	ƒx2td
ƒD]$}t
t|ƒ|id|ƒq½W|iƒ|i|ƒ|i	|ƒdS(NRwii
s2-- logging at DEBUG, nothing should be seen yet --s
Debug messages1-- logging at INFO, nothing should be seen yet --sInfo messages3-- logging at WARNING, 3 messages should be seen --sWarn messageifsInfo index = %d(R
RR?tcloset
removeHandlert
MemoryHandlertWARNINGRJRMt
addHandlerRrRSRRRQtxrangetMSG(Rtshtmhti((s-/usr/local/lib/python2.5/test/test_logging.pyttest2Xs(












sa.bcCsàtidƒidƒtidƒidƒtidƒidƒtidƒidƒtid	ƒid
ƒtidƒidƒtid
ƒidƒtidƒidƒtidƒidƒtidƒidƒdS(NtasInfo 1sa.bsInfo 2sa.csInfo 3sa.b.csInfo 4sa.b.c.dsInfo 5sa.bb.csInfo 6tbsInfo 7sb.asInfo 8sc.a.bsInfo 9sa.bbsInfo 10(R
RRR(((s-/usr/local/lib/python2.5/test/test_logging.pytdoLog3sscCs|tiƒ}|itiƒ|id}tdƒtƒtdtƒtitƒ}|i	|ƒtƒ|i
|ƒdS(Nis
Unfiltered...sFiltered with '%s'...(R
RRJRMR?RrRŽtFILTERtFilterR{R|(trootthandtfilt((s-/usr/local/lib/python2.5/test/test_logging.pyttest3s


s
[loggers]
keys=root

[handlers]
keys=hand1

[formatters]
keys=form1

[logger_root]
level=NOTSET
handlers=hand1

[handler_hand1]
class=StreamHandler
level=NOTSET
formatter=form1
args=(sys.stdout,)

[formatter_form1]
format=%(levelname)s:%(name)s:%(message)s
datefmt=
sc
[loggers]
keys=root,parser

[handlers]
keys=hand1

[formatters]
keys=form1

[logger_root]
level=NOTSET
handlers=hand1

[logger_parser]
level=DEBUG
handlers=hand1
propagate=1
qualname=compiler.parser

[handler_hand1]
class=StreamHandler
level=NOTSET
formatter=form1
args=(sys.stdout,)

[formatter_form1]
format=%(levelname)s:%(name)s:%(message)s
datefmt=
s
sys.stdouts
sys.stboutsformatter=form1sformatter=misspelled_namec	Cs¡xštdƒD]Œ}tƒd|}tiid|ƒtiƒii}ti	ƒz)ti
iƒ}ti}|iƒ}Wdti
ƒXzžtidƒ}t|dƒ}|i|ƒ|iƒy$tii|ƒtii|ƒWn'tiƒd}tt|ƒƒnXtdƒti|ƒWdti	ƒzTti
iƒti
i|ƒ|ti(tiƒii}|iƒ|i|ƒWdti
ƒXXq
WdS(Nisconfig%ds
config%d: s.initwisok.(trangetglobalsRnRoRpR
Rtmanagert
loggerDictt_acquireLockt	_handlerstcopyt_handlerListt_releaseLockttempfiletmktemptopenRtconfigt
fileConfigtexc_infoRrtstrtostremovetcleartupdate(	RŠtconfR™tsaved_handlerstsaved_handler_listt
saved_loggerstfntfR<((s-/usr/local/lib/python2.5/test/test_logging.pyttest4ÐsB









s5
[loggers]
keys=root

[handlers]
keys=hand1

[formatters]
keys=form1

[logger_root]
level=NOTSET
handlers=hand1

[handler_hand1]
class=StreamHandler
level=NOTSET
formatter=form1
args=(sys.stdout,)

[formatter_form1]
class=test.test_logging.FriendlyFormatter
format=%(levelname)s:%(name)s:%(message)s
datefmt=
tFriendlyFormattercBseZd„ZRS(cCsdt|dƒS(Ns%s... Don't panic!i(R¥(R
tei((s-/usr/local/lib/python2.5/test/test_logging.pytformatExceptions(RR R³(((s-/usr/local/lib/python2.5/test/test_logging.pyR±scCsstiƒii}tiƒz)tiiƒ}ti}|iƒ}WdtiƒXz¬t	i
dƒ}t|dƒ}|it
ƒ|iƒtii|ƒy
t‚Wn tj
otidƒnXti|ƒtiƒid}tiƒii|ƒWdtiƒzTtiiƒtii|ƒ|ti(tiƒii}|iƒ|i|ƒWdtiƒXXdS(Ns.iniR•sjust testingi(R
RR˜R™RšR›RœRRžRŸR R¡Rpttest5_configRR¢R£tKeyErrort	exceptionR¦R§R?R¨R©(R™R«R¬R­R®R¯R}((s-/usr/local/lib/python2.5/test/test_logging.pyttest5s:









cCs1t||f}tii|ƒtiiƒdS(N(tBANNERRnRoRptflush(tnmttyptsep((s-/usr/local/lib/python2.5/test/test_logging.pytbanner@scCsætidƒ}|itiƒtitiƒ}titiƒ}|i	|ƒ|i
|ƒtii}x\|tiidjo;yt
d|ƒ}Wn tij
o|d7}qlXPqlWtd‚tiid|ƒ}tiƒ}tidƒ}|itiƒti|ƒ}|i	tidƒƒ|i
|ƒd	|_g}	|	itid
td|fƒƒx|	D]}
|
iƒqrWz¤tdd
ƒ|i
|ƒtƒtidƒ|iƒ|i|ƒtddƒxKt ddƒD]:}td|d
ƒt!ƒd|ƒtd|dƒqëWWdt"i#ƒd|_$x|	D]}
|
i%dƒqGWtdd
ƒtii&|i'ƒƒ|iƒ|i|ƒ|iƒtddƒtii(ƒy|iƒWnnX|i|ƒXdS(NRwidR'isCould not find unused portR#tlogrecvs&%(name)s -> %(levelname)s: %(message)siR4R5t	log_test0tbeging@tendis
log_test%dstest%dslogrecv output()R
RRJRMt
StreamHandlerRnRot	FormattertBASIC_FORMATtsetFormatterR…R?R@R"R*RPtImportErrort
SocketHandlert	cStringIOtStringIOt	propagatetappendR6R7RBR9R½RYttimetsleepRR‚R–R—R-twaitRtjoinRptgetvalueR¹(t
rootLoggerR}tfmtR'RAtshdlrtsockOutt
sockLoggertsockhdlrtthreadstthreadR<((s-/usr/local/lib/python2.5/test/test_logging.pyttest_main_innerEsv

	

	"






	





tLC_ALLRwcCs;tidƒ}|iƒ}ztƒWd|i|ƒXdS(NRw(R
RtgetEffectiveLevelRÙRJ(troot_loggertoriginal_logging_level((s-/usr/local/lib/python2.5/test/test_logging.pyt	test_mainœs
t__main__s
test_logging
(IR!R)R¦RntstringRttypesRRÈR*RŸR6RÌR
tlogging.handlerstlogging.configttest.test_supportRR¸RtTIMEOUTtSocketServerRRRtEventR-R"RBRCRERYtSILENTRmtTERSEtEFFUSIVERltVERBOSEt	TALKATIVERjt
CHATTERBOXtBORINGR–RsRxRRdRiRkRrRtR€R‡R‹RRŽR”tconfig0tconfig1treplacetconfig2tconfig3R°R´RÃR±R·R½RÙRÞRRoRp(((s-/usr/local/lib/python2.5/test/test_logging.pys<module>s€T0$( 			P												E			( 	C	&		W


Man Man