ACC SHELL
Ñò
rÄMc @ sA d Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z y d d k
Z
d d k Z Wn e j
o
d Z
n Xd d k l Z l Z d Z e i d j o
d Z n d Z d a d d d „ Z d
„ Z d „ Z d „ Z d
„ Z d „ Z e d „ Z d „ Z d S( 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-2008 Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
iÿÿÿÿN( t ThreadingTCPServert StreamRequestHandleriF# t win32iF' ih i c C s¸ d d k } | i | ƒ } t | d ƒ o! t | d ƒ o | i | ƒ n | i | ƒ t | ƒ } t i ƒ z7 t i i ƒ t i 2t
| | ƒ } t | | | ƒ Wd t i ƒ Xd S( 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ÿÿÿÿNt readfpt readline(
t ConfigParsert hasattrR t readt _create_formatterst loggingt _acquireLockt _handlerst cleart _handlerListt _install_handlerst _install_loggerst _releaseLock( t fnamet defaultst disable_existing_loggersR t cpt
formatterst handlers( ( s$ /usr/lib/python2.6/logging/config.pyt
fileConfig7 s
c C s’ t i | d ƒ } | i d ƒ } t | ƒ } x^ | D]V } | d | } y t | | ƒ } Wq4 t j
o t | ƒ t | | ƒ } q4 Xq4 W| S( s) Resolve a dotted name to a global object.t .i ( t stringt splitt popt
__import__t getattrt AttributeError( t namet usedt foundt n( ( s$ /usr/lib/python2.6/logging/config.pyt _resolveZ s
c C s t d „ | ƒ S( Nc S s
t i | ƒ S( ( R t strip( t x( ( s$ /usr/lib/python2.6/logging/config.pyt <lambda>i s ( t map( t alist( ( s$ /usr/lib/python2.6/logging/config.pyt
_strip_spacesh s c C s* | i d d ƒ } t | ƒ p h St i | d ƒ } t | ƒ } h } xÛ | D]Ó } d | } | i | ƒ } d | j o | i | d d ƒ } n d } d | j o | i | d d ƒ } n d } t i } d | j o- | i | d ƒ } | o t | ƒ } q n | | | ƒ }
|
| | <qO W| S(
s Create and return formattersR t keyst ,s formatter_%st formati t datefmtt classN(
t gett lenR R R) t optionst NoneR t FormatterR# ( R t flistR t formt sectnamet optst fst dfst ct
class_namet f( ( s$ /usr/lib/python2.6/logging/config.pyR k s0
c C s | i d d ƒ } t | ƒ p h St i | d ƒ } t | ƒ } h } g } x | D]˜} d | } | i | d ƒ } | i | ƒ } d | j o | i | d ƒ } n d } y t | t t ƒ ƒ } Wn% t t
f j
o t | ƒ } n X| i | d ƒ }
t |
t t ƒ ƒ }
| |
Œ } d | j o* | i | d ƒ } | i t i
| ƒ n t | ƒ o | i | | ƒ n t | t i i ƒ oQ d
| j o | i | d
ƒ }
n d }
t |
ƒ o | i | |
f ƒ qãn | | | <qU Wx% | D] \ } } | i | | ƒ qøW| S( s Install and return handlersR R* R+ s
handler_%sR. t formattert t argst levelt target( R/ R0 R R R) R1 t evalt varsR R t NameErrorR# t setLevelt _levelNamest setFormattert
issubclassR t
MemoryHandlert appendt setTarget( R R t hlistR t fixupst handR6 t klassR7 t fmtR? t hR@ RA t t( ( s$ /usr/lib/python2.6/logging/config.pyR ˆ sL
c C s | i d d ƒ } t i | d ƒ } t d „ | ƒ } | i d ƒ d } t i } | } | i | ƒ } d | j o* | i | d ƒ } | i t i | ƒ n x | i
D] } | i | ƒ q© W| i | d ƒ }
t |
ƒ oD t i |
d ƒ }
t
|
ƒ }
x# |
D] } | i | | ƒ qWn | i i i ƒ } | i ƒ g }
xÝ| D]Õ} d | } | i | d
ƒ } | i | ƒ } d | j o | i | d ƒ } n d } t i | ƒ } | | j o‘ | i | ƒ } | d
} t | ƒ } t | ƒ } | d } xB | | j o4 | | | | j o |
i | | ƒ | d } q W| i | ƒ n d | j o* | i | d ƒ } | i t i | ƒ n x | i
D] } | i | ƒ q•W| | _ d | _ | i | d ƒ }
t |
ƒ oD t i |
d ƒ }
t
|
ƒ }
x# |
D] } | i | | ƒ qWqLqLWxa | D]Y } | i i | } | |
j o"