HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/logging/__pycache__/config.cpython-35.pyc


Fah
@sdZddlZddlZddlZddlZddlZddlZddlZddlZyddl	Z
ddlZWnek
rdZ
YnXddl
mZmZdZejZdaddddZdd	Zd
dZdd
ZddZddZddZejdejZddZGdddeZ Gddde!e Z"Gddde#e Z$Gddde%e Z&Gdd d eZ'Gd!d"d"e'Z(e(Z)d#d$Z*edd%d&Z+d'd(Z,dS))a
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.

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

To use, simply 'import logging' and log away!
N)ThreadingTCPServerStreamRequestHandleriF#Tc
Csddl}t||jr'|}n;|j|}t|drU|j|n
|j|t|}tj	z@tj
jtjdd=t
||}t|||WdtjXdS)aD
    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).
    rNreadline)configparser
isinstanceZRawConfigParserZConfigParserhasattrZ	read_fileread_create_formatterslogging_acquireLock	_handlersclear_handlerList_install_handlers_install_loggers_releaseLock)ZfnameZdefaultsdisable_existing_loggersrcp
formattershandlersr$/usr/lib/python3.5/logging/config.py
fileConfig8s		


rcCs|jd}|jd}t|}x]|D]U}|d|}yt||}Wq1tk
rt|t||}Yq1Xq1W|S)z)Resolve a dotted name to a global object..r)splitpop
__import__getattrAttributeError)nameusedfoundnrrr_resolveZs


r#cCstdd|S)NcSs
|jS)N)strip)xrrr<lambda>isz_strip_spaces.<locals>.<lambda>)map)Zalistrrr
_strip_spaceshsr(cCs|dd}t|siS|jd}t|}i}x|D]}d|}|j|ddddd	}|j|d
dddd	}|j|ddddd}tj}||jd
}	|	rt|	}||||}
|
||<qFW|S)zCreate and return formattersrkeys,zformatter_%sformatrawTfallbackNdatefmtstyle%class)lenrr(getr
	Formatterr#)rZflistrZformZsectnameZfsZdfsZstlcZ
class_namefrrrr	ks$

	r	c
Cs|dd}t|siS|jd}t|}i}g}x3|D]+}|d|}|d}|jdd}yt|tt}Wn$ttfk
rt	|}YnX|d}	t|	tt}	||	}
d	|kr
|d	}|
j
|t|r'|
j||t|tj
jrm|jd
d}t|rm|j|
|f|
||<qLWx%|D]\}
}
|
j||
qW|S)zInstall and return handlersrr)r*z
handler_%sr1	formatterargsleveltarget)r2rr(r3evalvarsr
r	NameErrorr#setLevelsetFormatter
issubclassr
MemoryHandlerappendZ	setTarget)rrhlistrZfixupshandsectionklassfmtr9hr:r;trrrrs>




rcCsdtj}xT|D]L}|jj|}||krStj|_g|_d|_q||_qWdS)a
    When (re)configuring logging, handle loggers which were in the previous
    configuration but are not in the new configuration. There's no point
    deleting them as other threads may continue to hold references to them;
    and by disabling them, you stop them doing any logging.

    However, don't disable children of named loggers, as that's probably not
    what was intended by the user. Also, allow existing loggers to NOT be
    disabled if disable_existing is false.
    TN)	r
rootmanager
loggerDictZNOTSETr:r	propagatedisabled)existing
child_loggersdisable_existingrKlogloggerrrr_handle_existing_loggerss	
	rUcCs|dd}|jd}ttdd|}|jd|d}tj}|}d|kr|d}|j|x(|jd	d	D]}|j|qW|d
}	t	|	r|	jd}	t
|	}	x|	D]}
|j||
qWt|jj
j}|jg}x|D]}|d|}|d}
|jd
dd}tj|
}|
|kr|j|
d}|
d}t	|}t	|}xE||kr||d	||kr|j|||d7}qW|j|
d|kr)|d}|j|x(|jd	d	D]}|j|q=W||_d|_|d
}	t	|	r.|	jd}	t
|	}	x|	D]}
|j||
qWq.Wt|||d	S)zCreate and install loggersloggersr)r*cSs
|jS)N)r$)r%rrrr&sz"_install_loggers.<locals>.<lambda>rKZlogger_rootr:Nrz	logger_%sZqualnamerNr-rr)rlistr'remover
rKr?r
removeHandlerr2r(
addHandlerrLrMr)sortZgetint	getLoggerindexrCrNrOrU)rrrRZllistrFrKrSr:rIrDrErPrQZqnrNrTiprefixedpflennum_existingrrrrsd

	










		

rz^[a-z_][a-z0-9_]*$cCs)tj|}|s%td|dS)Nz!Not a valid Python identifier: %rT)
IDENTIFIERmatch
ValueError)smrrrvalid_identsrhc@s1eZdZdZdddZddZdS)ConvertingMixinz?For ConvertingXXX's, this mixin class provides common functionsTcCs_|jj|}||k	r[|r.|||<t|tttfkr[||_||_|S)N)configuratorconverttypeConvertingDictConvertingListConvertingTupleparentkey)selfrqvaluereplaceresultrrrconvert_with_keys
		z ConvertingMixin.convert_with_keycCsF|jj|}||k	rBt|tttfkrB||_|S)N)rjrkrlrmrnrorp)rrrsrurrrrk(s	zConvertingMixin.convertN)__name__
__module____qualname____doc__rvrkrrrrrisric@s@eZdZdZddZdddZdddZdS)	rmz A converting dictionary wrapper.cCs"tj||}|j||S)N)dict__getitem__rv)rrrqrsrrrr|=szConvertingDict.__getitem__NcCs%tj|||}|j||S)N)r{r3rv)rrrqdefaultrsrrrr3AszConvertingDict.getcCs+tj|||}|j||ddS)NrtF)r{rrv)rrrqr}rsrrrrEszConvertingDict.pop)rwrxryrzr|r3rrrrrrm:srmc@s1eZdZdZddZdddZdS)	rnzA converting list wrapper.cCs"tj||}|j||S)N)rXr|rv)rrrqrsrrrr|KszConvertingList.__getitem__rWcCstj||}|j|S)N)rXrrk)rridxrsrrrrOszConvertingList.popN)rwrxryrzr|rrrrrrnIsrnc@s"eZdZdZddZdS)rozA converting tuple wrapper.cCs(tj||}|j||ddS)NrtF)tupler|rv)rrrqrsrrrr|UszConvertingTuple.__getitem__N)rwrxryrzr|rrrrroSsroc@seZdZdZejdZejdZejdZejdZ	ejdZ
ddd	d
iZee
ZddZd
dZddZddZddZddZddZdS)BaseConfiguratorzI
    The configurator base class which defines some useful defaults.
    z%^(?P<prefix>[a-z]+)://(?P<suffix>.*)$z^\s*(\w+)\s*z^\.\s*(\w+)\s*z^\[\s*(\w+)\s*\]\s*z^\d+$Zextext_convertZcfgcfg_convertcCst||_||j_dS)N)rmconfigrj)rrrrrr__init__nszBaseConfigurator.__init__c	Cs|jd}|jd}yz|j|}x`|D]X}|d|7}yt||}Wq7tk
r|j|t||}Yq7Xq7W|SWn]tk
rtjdd\}}td||f}|||_	|_
|YnXdS)z`
        Resolve strings to objects using standard import and attribute
        syntax.
        rrrWNzCannot resolve %r: %s)rrimporterrrImportErrorsysexc_infore	__cause__
__traceback__)	rrrfrr r!Zfragetbvrrrresolvers"



zBaseConfigurator.resolvecCs
|j|S)z*Default converter for the ext:// protocol.)r)rrrsrrrrszBaseConfigurator.ext_convertcCsY|}|jj|}|dkr7td|n||jd}|j|jd}x|rT|jj|}|r||jd}n|jj|}|r|jd}|jj|s||}n9yt	|}||}Wnt
k
r||}YnX|r;||jd}qgtd||fqgW|S)z*Default converter for the cfg:// protocol.NzUnable to convert %rrzUnable to convert %r at %r)WORD_PATTERNrdreendrgroupsDOT_PATTERN
INDEX_PATTERN
DIGIT_PATTERNint	TypeError)rrrsrestrgdr~r"rrrrs2	

zBaseConfigurator.cfg_convertcCs&t|tr7t|tr7t|}||_nt|trnt|trnt|}||_nt|trt|trt|}||_n}t|tr"|j	j
|}|r"|j}|d}|jj
|d}|r"|d}t||}||}|S)z
        Convert values to an appropriate type. dicts, lists and tuples are
        replaced by their converting alternatives. Strings are checked to
        see if they have a conversion format and are converted if they do.
        prefixNsuffix)rrmr{rjrnrXrorstrCONVERT_PATTERNrd	groupdictvalue_convertersr3r)rrrsrgrrZ	converterrrrrrks*

zBaseConfigurator.convertcsjd}t|s*|j|}jdd}tfddD}||}|rx*|jD]\}}t|||qzW|S)z1Configure an object with a user-supplied factory.z()rNcs,g|]"}t|r||fqSr)rh).0k)rrr
<listcomp>s	z5BaseConfigurator.configure_custom.<locals>.<listcomp>)rcallablerr{itemssetattr)rrrr5propskwargsrurrsr)rrconfigure_customsz!BaseConfigurator.configure_customcCst|trt|}|S)z0Utility function which converts lists to tuples.)rrXr)rrrsrrras_tupleszBaseConfigurator.as_tupleN)rwrxryrzrecompilerrrrrrstaticmethodrrrrrrrkrrrrrrrZs "rc@seZdZdZddZddZddZdd	Zd
dZdd
Z	dddZ
dddZdddZdS)DictConfiguratorz]
    Configure logging using a dictionary-like object to describe the
    configuration.
    cCs<|j}d|kr!td|ddkrEtd|d|jdd}i}tjz|r|jd|}x|D]}|tjkrtd|qyItj|}||}|jd	d
}|r|jtj|Wqt	k
r7}	ztd||	fWYd
d
}	~	XqXqW|jd|}
xg|
D]_}y|j
||
|d
WqUt	k
r}	ztd||	fWYd
d
}	~	XqUXqUW|jdd
}|r)y|j|d
Wq)t	k
r}	ztd|	WYd
d
}	~	Xq)Xn
|jdd
}tjjtj
d
d
=|jd|}
xg|
D]_}y|j|
||
|<Wqgt	k
r}	ztd||	fWYd
d
}	~	XqgXqgW|jd|}xg|D]_}y|j||||<Wqt	k
rA}	ztd||	fWYd
d
}	~	XqXqW|jd|}g}xt|D]}y*|j||}||_|||<Wqkt	k
r}	z=dt|	kr|j|ntd||	fWYd
d
}	~	XqkXqkWxv|D]n}y*|j||}||_|||<Wqt	k
rs}	ztd||	fWYd
d
}	~	XqXqWtj}t|jjj}|jg}|jd|}
x|
D]}||kr^|j|d}|d}t|}t|}xE||krP||d
||krC|j|||d7}qW|j|y|j
||
|Wqt	k
r}	ztd||	fWYd
d
}	~	XqXqWt||||jdd
}|r)y|j|Wn5t	k
r(}	ztd|	WYd
d
}	~	XnXWd
tjXd
S)zDo the configuration.versionz$dictionary doesn't specify a versionrWzUnsupported version: %sincrementalFrzNo handler found with name %rr:Nz"Unable to configure handler %r: %srVTz!Unable to configure logger %r: %srKz#Unable to configure root logger: %srrz$Unable to configure formatter %r: %sfiltersz!Unable to configure filter %r: %sztarget not configured yetr) rrerr
rr3rr?_checkLevel	Exceptionconfigure_loggerconfigure_rootr
rconfigure_formatterconfigure_filtersortedconfigure_handlerrrrCrKrXrLrMr)r\r^r2rYrUr)rrrrZ
EMPTY_DICTrrhandlerZhandler_configr:rrVrKrRrrZdeferredrPrQr_r`rarbrrr	configures	




'
' 

'
'	'
	'	



'	!zDictConfigurator.configurec
Csd|kr|d}y|j|}Wq
tk
r}zFdt|krS|jd|d<||d<|j|}WYdd}~Xq
Xnx|jdd}|jdd}|jdd}|jd	d}|stj}	nt|}	|	|||}|S)
z(Configure a formatter from a dictionary.z()z'format'r+rHNr.r/r0r1)rrrrr3r
r4r#)
rrrfactoryruterHZdfmtr/cnamer5rrrrs&

%z$DictConfigurator.configure_formattercCsCd|kr|j|}n!|jdd}tj|}|S)z%Configure a filter from a dictionary.z()rr8)rr3r
ZFilter)rrrrurrrrrs
z!DictConfigurator.configure_filtercCsoxh|D]`}y|j|jd|Wqtk
rf}ztd||fWYdd}~XqXqWdS)z/Add filters to a filterer from a list of names.rzUnable to add filter %r: %sN)Z	addFilterrrre)rrZfiltererrr6rrrradd_filterss

zDictConfigurator.add_filtersc/sDt}jdd}|rwy|jd|}Wn;tk
rv}ztd||fWYdd}~XnXjdd}jdd}dkrjd}t|s|j|}|}nKjd}	|j|	}
t|
tj	j
rd	kryN|jd
d	}t|tjs\j
|td|d	<Wqtk
r}ztdd	|fWYdd}~XqXnst|
tj	jrd
kr|jd
d
<n8t|
tj	jrdkr|jdd<|
}jdd}tfddD}
y||
}WnYtk
r}z9dt|kr|
jd|
d<||
}WYdd}~XnX|r|j||dk	r|jtj||r
|j|||r@x*|jD]\}}t|||q W|S)z&Configure a handler from a dictionary.r7NrzUnable to set formatter %r: %sr:rz()r1r;rztarget not configured yetz#Unable to set target handler %r: %sZmailhostZaddressrcs,g|]"}t|r||fqSr)rh)rr)rrrrs	z6DictConfigurator.configure_handler.<locals>.<listcomp>z'stream'streamZstrm)r{rrrrerrrAr
rrBrZHandlerupdaterZSMTPHandlerrZ
SysLogHandlerrr@r?rrrr)rrrZconfig_copyr7rr:rr5rrrGZthrrrurrrsr)rrrsl#	
*
z"DictConfigurator.configure_handlercCsoxh|D]`}y|j|jd|Wqtk
rf}ztd||fWYdd}~XqXqWdS)z.Add handlers to a logger from a list of names.rzUnable to add handler %r: %sN)r[rrre)rrrTrrIrrrradd_handlerss

zDictConfigurator.add_handlersFcCs|jdd}|dk	r4|jtj||sx(|jddD]}|j|qNW|jdd}|r|j|||jdd}|r|j||dS)zU
        Perform configuration which is common to root and non-root loggers.
        r:Nrr)r3r?r
rrrZrr)rrrTrrr:rIrrrrrcommon_logger_configsz%DictConfigurator.common_logger_configcCsMtj|}|j||||jdd}|dk	rI||_dS)z.Configure a non-root logger from a dictionary.rNN)r
r]rr3rN)rrrrrrTrNrrrr
s
z!DictConfigurator.configure_loggercCs#tj}|j|||dS)z*Configure a root logger from a dictionary.N)r
r]r)rrrrrKrrrrszDictConfigurator.configure_rootN)
rwrxryrzrrrrrrrrrrrrrrs	?rcCst|jdS)z%Configure logging using a dictionary.N)dictConfigClassr)rrrr
dictConfigsrcsptstdGdddt}Gdddt}Gfdddtj||||S)au
    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().

    Use the ``verify`` argument to verify any bytes received across the wire
    from a client. If specified, it should be a callable which receives a
    single argument - the bytes of configuration data received across the
    network - and it should return either ``None``, to indicate that the
    passed in bytes could not be verified and should be discarded, or a
    byte string which is then passed to the configuration machinery as
    normal. Note that you can return transformed bytes, e.g. by decrypting
    the bytes passed in.
    z listen() needs threading to workc@s"eZdZdZddZdS)z#listen.<locals>.ConfigStreamHandlerz
        Handler for a logging configuration request.

        It expects a completely new logging configuration and uses fileConfig
        to install it.
        cSsyv|j}|jd}t|dkrutjd|d}|jj|}x3t||kr||j|t|}qXW|jjdk	r|jj|}|dk	rY|jd}y>ddl}|j	|}t
|tstt
|WnNtk
rXtj|}yt|Wntk
rStjYnXYnX|jjru|jjjWn7tk
r}z|jtkrWYdd}~XnXdS)z
            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.
            z>LrNzutf-8)Z
connectionZrecvr2structZunpackserververifydecodejsonloadsrr{AssertionErrorrrioStringIOr	traceback	print_excreadysetOSErrorerrnoRESET_ERROR)rrZconnchunkZslenrrfilerrrrhandle;s8	!

z*listen.<locals>.ConfigStreamHandler.handleN)rwrxryrzrrrrrConfigStreamHandler4src@sCeZdZdZdZdedddddZddZdS)	z$listen.<locals>.ConfigSocketReceiverzD
        A simple TCP socket-based logging config receiver.
        rWZ	localhostNcSsUtj|||f|tjd|_tjd|_||_||_dS)NrrW)	rrr
rabortrtimeoutrr)rrZhostportrrrrrrris
	
		z-listen.<locals>.ConfigSocketReceiver.__init__cSsddl}d}xg|s{|j|jjggg|j\}}}|r[|jtj|j}tjqW|jj	dS)Nr)
selectZsocketfilenorZhandle_requestr
rrrclose)rrrrZrdwrZexrrrserve_until_stoppedss	

	z8listen.<locals>.ConfigSocketReceiver.serve_until_stopped)rwrxryrzZallow_reuse_addressDEFAULT_LOGGING_CONFIG_PORTrrrrrrConfigSocketReceiverbs
	rcs1eZdZfddZddZS)zlisten.<locals>.ServercsJt|j||_||_||_||_tj|_dS)N)	superrrcvrhdlrrr	threadingZEventr)rrrrrr)Server	__class__rrrs				zlisten.<locals>.Server.__init__c	Ss|jd|jd|jd|jd|j}|jdkrO|jd|_|jjtj|a	tj
|jdS)NrrrrrrW)rrrrrZserver_addressrr
r	_listenerrr)rrrrrrruns	


zlisten.<locals>.Server.run)rwrxryrrr)r)rrrsr)threadNotImplementedErrorrrrZThread)rrrrr)rrlistens.rc
Cs5tjztr"dt_daWdtjXdS)zN
    Stop the listening server which was created with a call to listen().
    rWN)r
rrrrrrrr
stopListenings
	
r)-rzrrr
Zlogging.handlersrrrr_threadrrrZsocketserverrrrZ
ECONNRESETrrrr#r(r	rrUrrIrcrhobjectrir{rmrXrnrrorrrrrrrrrr<module>sJ
	"#V!
9|