config root man

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

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/logging/config.pyc

³ò
h”Rc@s5dZddkZddkZddkZddkZddkZddkZddkZddkZddk	Z	yddk
Z
ddkZWnej
o
dZ
nXddklZlZdZeidjo
dZndZdadd„Zd	„Zd
„Zd„Zd„Zed
„Zd„ZdS(sž
Configuration functions for the logging package for Python. The core package
is based on PEP 282 and comments thereto in comp.lang.python, and influenced
by Apache's log4j system.

Should work under Python versions >= 1.5.2, except that source line
information is not available unless 'sys._getframe()' is.

Copyright (C) 2001-2004 Vinay Sajip. All Rights Reserved.

To use, simply 'import logging' and log away!
iÿÿÿÿN(tThreadingTCPServertStreamRequestHandleriF#twin32iF'ihcCsµddk}|i|ƒ}t|dƒo!t|dƒo|i|ƒn|i|ƒt|ƒ}tiƒz4tiiƒti	2t
||ƒ}t||ƒWdtiƒXdS(s5
    Read the logging configuration from a ConfigParser-format file.

    This can be called several times from an application, allowing an end user
    the ability to select from various pre-canned configurations (if the
    developer provides a mechanism to present the choices and load the chosen
    configuration).
    In versions of ConfigParser which have the readfp method [typically
    shipped in 2.x versions of Python], you can pass in a file-like object
    rather than a filename, in which case the file-like object will be read
    using readfp.
    iÿÿÿÿNtreadfptreadline(
tConfigParserthasattrRtreadt_create_formatterstloggingt_acquireLockt	_handlerstcleart_handlerListt_install_handlerst_install_loggerst_releaseLock(tfnametdefaultsRtcpt
formattersthandlers((s*/usr/local/lib/python2.5/logging/config.pyt
fileConfig7s
 


cCs’ti|dƒ}|idƒ}t|ƒ}x^|D]V}|d|}yt||ƒ}Wq4tj
o t|ƒt||ƒ}q4Xq4W|S(s)Resolve a dotted name to a global object.t.i(tstringtsplittpopt
__import__tgetattrtAttributeError(tnametusedtfoundtn((s*/usr/local/lib/python2.5/logging/config.pyt_resolveZs
cCs*|iddƒ}t|ƒphSnti|dƒ}h}xä|D]Ü}dti|ƒ}|i|ƒ}d|jo|i|ddƒ}nd	}d|jo|i|ddƒ}nd	}ti}d|jo-|i|dƒ}	|	ot	|	ƒ}q	n|||ƒ}
|
||<qFW|S(
sCreate and return formattersRtkeyst,sformatter_%stformatitdatefmttclassN(
tgettlenRRtstriptoptionstNoneR	t	FormatterR"(RtflistRtformtsectnametoptstfstdfstct
class_nametf((s*/usr/local/lib/python2.5/logging/config.pyRis.


	
cCsñ|iddƒ}t|ƒphSnti|dƒ}h}g}x}|D]u}dti|ƒ}|i|dƒ}|i|ƒ}d|jo|i|dƒ}	nd}	t|ttƒƒ}|i|dƒ}
t|
ttƒƒ}
t	||
ƒ}d	|jo*|i|d	ƒ}|i
ti|ƒnt|	ƒo|i||	ƒn|ti
ijoQd
|jo|i|d
ƒ}
nd}
t|
ƒo|i||
fƒq·n|||<qLWx%|D]\}}|i||ƒqÌW|S(sInstall and return handlersRR#R$s
handler_%sR't	formatterttargstlevelttarget(R(R)RRR*R+tevaltvarsR	tapplytsetLevelt_levelNamestsetFormatterRt
MemoryHandlertappendt	setTarget(RRthlistRtfixupsthandR0tklassR1tfmtR9thR:R;tt((s*/usr/local/lib/python2.5/logging/config.pyR…sD





cCs·|iddƒ}ti|dƒ}td„|ƒ}|idƒd}ti}|}|i|ƒ}d|jo*|i|dƒ}|iti	|ƒnx|i
D]}|i|ƒq©W|i|dƒ}	t|	ƒoAti|	dƒ}	x,|	D] }
|i
|ti|
ƒƒqøWn|iiiƒ}xZ|D]R}d	|}|i|d
ƒ}|i|ƒ}d|jo|i|dƒ}
nd}
ti|ƒ}||jo|i|ƒnd|jo*|i|dƒ}|iti	|ƒnx|i
D]}|i|ƒqW|
|_d
|_|i|dƒ}	t|	ƒoAti|	dƒ}	x,|	D] }
|i
|ti|
ƒƒqcWq9q9Wx!|D]}d|ii|_q–WdS(sCreate and install loggerstloggersR#R$cSs
ti|ƒS((RR*(tx((s*/usr/local/lib/python2.5/logging/config.pyt<lambda>³stroottlogger_rootR:Rs	logger_%stqualnamet	propagateiiN(R(RRtmaptremoveR	ROR+R?R@Rt
removeHandlerR)t
addHandlerR*tmanagert
loggerDictR#tgetintt	getLoggerRRtdisabled(RRtllistR0ROtlogR1R:RJRERGtexistingtqnRRtlogger((s*/usr/local/lib/python2.5/logging/config.pyR­sb
	

"



		
&cCshtp
td‚ndtfd„ƒY}dtfd„ƒY}d„}tid|d|||fƒS(	sW
    Start up a socket server on the specified port, and listen for new
    configurations.

    These will be sent as a file suitable for processing by fileConfig().
    Returns a Thread object on which you can call start() to start the server,
    and which you can join() when appropriate. To stop the server, call
    stopListening().
    s listen() needs threading to worktConfigStreamHandlercBseZdZd„ZRS(s¤
        Handler for a logging configuration request.

        It expects a completely new logging configuration and uses fileConfig
        to install it.
        c	
Ss~ddk}y|i}|idƒ}t|ƒdjoãtid|ƒd}|ii|ƒ}x5t|ƒ|jo!||i|t|ƒƒ}qeW|idƒ}t|dƒ}|i|ƒ|i	ƒyt
|ƒWn,ttfj
o
‚nt
iƒnXti|ƒnWnYtij
oJ}t|iƒtijo‚qz|id}|tjo‚qznXdS(sè
            Handle a request.

            Each request is expected to be a 4-byte length, packed using
            struct.pack(">L", n), followed by the config file.
            Uses fileConfig() to do the grunt work.
            iÿÿÿÿNis>Lis.initw(ttempfilet
connectiontrecvR)tstructtunpacktmktemptopentwritetcloseRtKeyboardInterruptt
SystemExitt	tracebackt	print_exctosRTtsocketterrorttypeR9ttypest	TupleTypetRESET_ERROR(	tselfRctconntchunktslentfileR6teterrcode((s*/usr/local/lib/python2.5/logging/config.pythandles6	"



(t__name__t
__module__t__doc__R~(((s*/usr/local/lib/python2.5/logging/config.pyRaûstConfigSocketReceivercBs/eZdZdZdedd„Zd„ZRS(sD
        A simple TCP socket-based logging config receiver.
        it	localhostcSsCti|||f|ƒtiƒd|_tiƒd|_dS(Nii(Rt__init__R	R
tabortRttimeout(Rwthosttportthandler((s*/usr/local/lib/python2.5/logging/config.pyR„2s

	
cSs‡ddk}d}xn|pf|i|iiƒggg|iƒ\}}}|o|iƒntiƒ|i}tiƒqWdS(Niÿÿÿÿi(	tselectRqtfilenoR†thandle_requestR	R
R…R(RwRŠR…trdtwrtex((s*/usr/local/lib/python2.5/logging/config.pytserve_until_stopped:s
	N(RR€Rtallow_reuse_addresstDEFAULT_LOGGING_CONFIG_PORTR,R„R(((s*/usr/local/lib/python2.5/logging/config.pyR‚+s
cSs=|d|d|ƒ}tiƒ|atiƒ|iƒdS(NRˆR‰(R	R
t	_listenerRR(trcvrthdlrRˆtserver((s*/usr/local/lib/python2.5/logging/config.pytserveGs


R;R9(tthreadtNotImplementedErrorRRt	threadingtThread(RˆRaR‚R—((s*/usr/local/lib/python2.5/logging/config.pytlistenîs

0	cCs2to'tiƒdt_datiƒndS(sN
    Stop the listening server which was created with a call to listen().
    iN(R“R	R
R…R,R(((s*/usr/local/lib/python2.5/logging/config.pyt
stopListeningSs

	(RtsysR	tlogging.handlersRRqRfRpRnRtR˜RštImportErrorR,tSocketServerRRR’tplatformRvR“RR"RRRRœR(((s*/usr/local/lib/python2.5/logging/config.pys<module>s&l
#			(	Ae

Man Man