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/__init__.pyc

hRc@s~dZddkZddkZddkZddkZddkZddkZddkZyddkZWne	j
o
dZnXyddkZddkZWne	j
o
dZnXdZ
dZdZdZeedodeied	fZn3eied	dJjoed	 dZneZeiieZd
Zeedo
dZneiZdZdZdZdZeZdZdZ e Z!dZ"dZ#dZ$hde<de<de <de"<de#<de$<ed<ed<e d<e d<e"d<e#d<e$d<Z%dZ&dZ'da(d Z)d!Z*d"dKd#YZ+d$Z,d%dLd&YZ-e-Z.d'dMd(YZ/d)dNd*YZ0d+dOd,YZ1hZ2gZ3d-e1fd.YZ4d/e4fd0YZ5d1e5fd2YZ6d3dPd4YZ7da8d5Z9d6Z:d7dQd8YZ;d9e1fd:YZ<d;e<fd<YZ=e<a8e=e Z>e>e<_>e;e<i>e<_?d=Z@d>ZAdd?ZBd@ZCeCZDdAZEdBZFdCZGeGZHdDZIdEZJdFZKdGZLe3dHZMyddkNZNeNiOeMWn+e	j
oeiPdIZQeQe_PnXdS(Rsj
Logging package for Python. 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-2007 Vinay Sajip. All Rights Reserved.

To use, simply 'import logging' and log away!
iNs&Vinay Sajip <vinay_sajip@red-dove.com>t
productions0.5.0.2s16 February 2007tfrozenslogging%s__init__%sis.pycs.pyos.pycCs%y
tWntiiiSnXdS(s5Return the frame object for the caller's stack frame.N(t	Exceptiontsyst
exc_tracebackttb_frametf_back(((s,/usr/local/lib/python2.5/logging/__init__.pytcurrentframe@s
t	_getframecCs
tidS(i(RR(((s,/usr/local/lib/python2.5/logging/__init__.pyt<lambda>Gsii2i(iii
itCRITICALtERRORtWARNINGtINFOtDEBUGtNOTSETtWARNcCsti|d|S(s
    Return the textual representation of logging level 'level'.

    If the level is one of the predefined levels (CRITICAL, ERROR, WARNING,
    INFO, DEBUG) then you get the corresponding string. If you have
    associated levels with names using addLevelName then the name you have
    associated with 'level' is returned.

    If a numeric value corresponding to one of the defined levels is passed
    in, the corresponding string representation is returned.

    Otherwise, the string "Level %s" % level is returned.
    sLevel %s(t_levelNamestget(tlevel((s,/usr/local/lib/python2.5/logging/__init__.pytgetLevelNamescCs.tz|t|<|t|<WdtXdS(sy
    Associate 'levelName' with 'level'.

    This is used when converting levels to text during message formatting.
    N(t_acquireLockRt_releaseLock(Rt	levelName((s,/usr/local/lib/python2.5/logging/__init__.pytaddLevelNames

cCs8tototiantotindS(s
    Acquire the module-level lock for serializing access to shared data.

    This should be released with _releaseLock().
    N(t_locktthreadt	threadingtRLocktacquire(((s,/usr/local/lib/python2.5/logging/__init__.pyRscCstotindS(sK
    Release the module-level lock acquired by calling _acquireLock().
    N(Rtrelease(((s,/usr/local/lib/python2.5/logging/__init__.pyRst	LogRecordcBs,eZdZddZdZdZRS(s
    A LogRecord instance represents an event being logged.

    LogRecord instances are created every time something is logged. They
    contain all the information pertinent to the event being logged. The
    main information passed in is in msg and args, which are combined
    using str(msg) % args to create the message field of the record. The
    record also includes information such as when the record was created,
    the source line where the logging call was made, and any exception
    information to be logged.
    c	
Csti}	||_||_|oFt|djo3|do(t|dtijo|d}n||_t||_	||_
||_y5ti
i||_ti
i|id|_Wn||_d|_nX||_d|_||_||_|	|_|	t|	d|_|itd|_to/to(ti|_ti i!|_"nd|_d|_"t#o#t$tdoti%|_&n
d|_&dS(sK
        Initialize a logging record with interesting information.
        iisUnknown moduleitgetpidN('ttimetnametmsgtlenttypettypestDictTypetargsRt	levelnametlevelnotpathnametostpathtbasenametfilenametsplitexttmoduletexc_infotNonetexc_texttlinenotfuncNametcreatedtlongtmsecst
_startTimetrelativeCreatedt
logThreadsRt	get_identRt
currentThreadtgetNamet
threadNametlogProcessesthasattrR tprocess(
tselfR"RR+R5R#R(R2tfunctct((s,/usr/local/lib/python2.5/logging/__init__.pyt__init__s<		?			 	
							cCs&d|i|i|i|i|ifS(Ns!<LogRecord: %s, %s, %s, %s, "%s">(R"R*R+R5R#(RD((s,/usr/local/lib/python2.5/logging/__init__.pyt__str__scCsttdpt|i}n_|i}t|titifjo6yt|i}Wqtj
o|i}qXn|io||i}n|S(s
        Return the message for this LogRecord.

        Return the message for this LogRecord after merging any user-supplied
        arguments with the message.
        tUnicodeType(	RBR&tstrR#R%RIt
StringTypetUnicodeErrorR((RDR#((s,/usr/local/lib/python2.5/logging/__init__.pyt
getMessages	
N(t__name__t
__module__t__doc__R3RGRHRM(((s,/usr/local/lib/python2.5/logging/__init__.pyRs2	c	Cs5tdddddddd}|ii||S(s
    Make a LogRecord whose attributes are defined by the specified dictionary,
    This function is useful for converting a logging event received over
    a socket connection (which is sent as a dictionary) into a LogRecord
    instance.
    tiN((RR3t__dict__tupdate(tdicttrv((s,/usr/local/lib/python2.5/logging/__init__.pyt
makeLogRecord#s!t	FormattercBsDeZdZeiZdddZddZdZ	dZ
RS(s
    Formatter instances are used to convert a LogRecord to text.

    Formatters need to know how a LogRecord is constructed. They are
    responsible for converting a LogRecord to (usually) a string which can
    be interpreted by either a human or an external system. The base Formatter
    allows a formatting string to be specified. If none is supplied, the
    default value of "%s(message)\n" is used.

    The Formatter can be initialized with a format string which makes use of
    knowledge of the LogRecord attributes - e.g. the default value mentioned
    above makes use of the fact that the user's message and arguments are pre-
    formatted into a LogRecord's message attribute. Currently, the useful
    attributes in a LogRecord are described by:

    %(name)s            Name of the logger (logging channel)
    %(levelno)s         Numeric logging level for the message (DEBUG, INFO,
                        WARNING, ERROR, CRITICAL)
    %(levelname)s       Text logging level for the message ("DEBUG", "INFO",
                        "WARNING", "ERROR", "CRITICAL")
    %(pathname)s        Full pathname of the source file where the logging
                        call was issued (if available)
    %(filename)s        Filename portion of pathname
    %(module)s          Module (name portion of filename)
    %(lineno)d          Source line number where the logging call was issued
                        (if available)
    %(funcName)s        Function name
    %(created)f         Time when the LogRecord was created (time.time()
                        return value)
    %(asctime)s         Textual time when the LogRecord was created
    %(msecs)d           Millisecond portion of the creation time
    %(relativeCreated)d Time in milliseconds when the LogRecord was created,
                        relative to the time the logging module was loaded
                        (typically at application startup time)
    %(thread)d          Thread ID (if available)
    %(threadName)s      Thread name (if available)
    %(process)d         Process ID (if available)
    %(message)s         The result of record.getMessage(), computed just as
                        the record is emitted
    cCs*|o
||_n
d|_||_dS(s8
        Initialize the formatter with specified format strings.

        Initialize the formatter either with the specified format string, or a
        default as described above. Allow for specialized date formatting with
        the optional datefmt argument (if omitted, you get the ISO8601 format).
        s%(message)sN(t_fmttdatefmt(RDtfmtRY((s,/usr/local/lib/python2.5/logging/__init__.pyRG^s
	cCsX|i|i}|oti||}n&tid|}d||if}|S(s
        Return the creation time of the specified LogRecord as formatted text.

        This method should be called from format() by a formatter which
        wants to make use of a formatted time. This method can be overridden
        in formatters to provide for any specific requirement, but the
        basic behaviour is as follows: if datefmt (a string) is specified,
        it is used with time.strftime() to format the creation time of the
        record. Otherwise, the ISO8601 format is used. The resulting
        string is returned. This function uses a user-configurable function
        to convert the creation time to a tuple. By default, time.localtime()
        is used; to change this for a particular formatter instance, set the
        'converter' attribute to a function with the same signature as
        time.localtime() or time.gmtime(). To change it for all formatters,
        for example if you want all logging times to be shown in GMT,
        set the 'converter' attribute in the Formatter class.
        s%Y-%m-%d %H:%M:%Ss%s,%03d(t	converterR7R!tstrftimeR9(RDtrecordRYRFtstt((s,/usr/local/lib/python2.5/logging/__init__.pyt
formatTimelscCsjti}ti|d|d|dd||i}|i|ddjo|d }n|S(s
        Format and return the specified exception information as a string.

        This default implementation just uses
        traceback.print_exception()
        iiiis
N(t	cStringIOtStringIOt	tracebacktprint_exceptionR3tgetvaluetclose(RDteitsioR^((s,/usr/local/lib/python2.5/logging/__init__.pytformatExceptions%
cCs|i|_ti|iddjo|i||i|_n|i|i}|i	o'|i
p|i|i	|_
qn|i
o0|ddjo|d}n||i
}n|S(s[
        Format the specified record as text.

        The record's attribute dictionary is used as the operand to a
        string formatting operation which yields the returned string.
        Before formatting the dictionary, a couple of preparatory steps
        are carried out. The message attribute of the record is computed
        using LogRecord.getMessage(). If the formatting string contains
        "%(asctime)", formatTime() is called to format the event time.
        If there is exception information, it is formatted using
        formatException() and appended to the message.
        s
%(asctime)iis
(RMtmessagetstringtfindRXR`RYtasctimeRRR2R4Ri(RDR]R^((s,/usr/local/lib/python2.5/logging/__init__.pytformats



N(RNRORPR!t	localtimeR[R3RGR`RiRn(((s,/usr/local/lib/python2.5/logging/__init__.pyRW2s(		tBufferingFormattercBs5eZdZddZdZdZdZRS(sB
    A formatter suitable for formatting a number of records.
    cCs!|o
||_n
t|_dS(sm
        Optionally specify a formatter which will be used to format each
        individual record.
        N(tlinefmtt_defaultFormatter(RDRq((s,/usr/local/lib/python2.5/logging/__init__.pyRGs
cCsdS(sE
        Return the header string for the specified records.
        RQ((RDtrecords((s,/usr/local/lib/python2.5/logging/__init__.pytformatHeaderscCsdS(sE
        Return the footer string for the specified records.
        RQ((RDRs((s,/usr/local/lib/python2.5/logging/__init__.pytformatFooterscCsnd}t|djoQ||i|}x$|D]}||ii|}q3W||i|}n|S(sQ
        Format the specified records and return the result as a string.
        RQi(R$RtRqRnRu(RDRsRUR]((s,/usr/local/lib/python2.5/logging/__init__.pyRnsN(RNRORPR3RGRtRuRn(((s,/usr/local/lib/python2.5/logging/__init__.pyRps

		tFiltercBs#eZdZddZdZRS(s
    Filter instances are used to perform arbitrary filtering of LogRecords.

    Loggers and Handlers can optionally use Filter instances to filter
    records as desired. The base filter class only allows events which are
    below a certain point in the logger hierarchy. For example, a filter
    initialized with "A.B" will allow events logged by loggers "A.B",
    "A.B.C", "A.B.C.D", "A.B.D" etc. but not "A.BB", "B.A.B" etc. If
    initialized with the empty string, all events are passed.
    RQcCs||_t||_dS(s
        Initialize a filter.

        Initialize with the name of the logger which, together with its
        children, will have its events allowed through the filter. If no
        name is specified, allow every event.
        N(R"R$tnlen(RDR"((s,/usr/local/lib/python2.5/logging/__init__.pyRGs	cCsw|idjodSnL|i|ijodSn1ti|i|id|idjodSn|i|idjS(s
        Determine if the specified record is to be logged.

        Is the specified record to be logged? Returns 0 for no, nonzero for
        yes. If deemed appropriate, the record may be modified in-place.
        iit.(RwR"RkRl(RDR]((s,/usr/local/lib/python2.5/logging/__init__.pytfilters((RNRORPRGRy(((s,/usr/local/lib/python2.5/logging/__init__.pyRvs
tFilterercBs2eZdZdZdZdZdZRS(s[
    A base class for loggers and handlers which allows them to share
    common code.
    cCs
g|_dS(sE
        Initialize the list of filters to be an empty list.
        N(tfilters(RD((s,/usr/local/lib/python2.5/logging/__init__.pyRG
scCs(||ijo|ii|ndS(s;
        Add the specified filter to this handler.
        N(R{tappend(RDRy((s,/usr/local/lib/python2.5/logging/__init__.pyt	addFilterscCs(||ijo|ii|ndS(s@
        Remove the specified filter from this handler.
        N(R{tremove(RDRy((s,/usr/local/lib/python2.5/logging/__init__.pytremoveFilterscCs9d}x,|iD]!}|i|pd}PqqW|S(s
        Determine if a record is loggable by consulting all the filters.

        The default is to allow the record to be logged; any filter can veto
        this and the record is then dropped. Returns a zero value if a record
        is to be dropped, else non-zero.
        ii(R{Ry(RDR]RUtf((s,/usr/local/lib/python2.5/logging/__init__.pyRys
	(RNRORPRGR}RRy(((s,/usr/local/lib/python2.5/logging/__init__.pyRzs
			tHandlercBs}eZdZedZdZdZdZdZdZ	dZ
dZd	Zd
Z
dZdZRS(
sq
    Handler instances dispatch logging events to specific destinations.

    The base handler class. Acts as a placeholder which defines the Handler
    interface. Handlers can optionally use Formatter instances to format
    records as desired. By default, no formatter is specified; in this case,
    the 'raw' message as determined by record.message is logged.
    cCs]ti|||_d|_tzdt|<tid|Wdt	X|i
dS(sz
        Initializes the instance - basically setting the formatter to None
        and the filter list to empty.
        iiN(RzRGRR3t	formatterRt	_handlerst_handlerListtinsertRt
createLock(RDR((s,/usr/local/lib/python2.5/logging/__init__.pyRG=s
		
cCs'toti|_n
d|_dS(sU
        Acquire a thread lock for serializing access to the underlying I/O.
        N(RRRtlockR3(RD((s,/usr/local/lib/python2.5/logging/__init__.pyRNscCs|io|iindS(s.
        Acquire the I/O thread lock.
        N(RR(RD((s,/usr/local/lib/python2.5/logging/__init__.pyRWs
cCs|io|iindS(s.
        Release the I/O thread lock.
        N(RR(RD((s,/usr/local/lib/python2.5/logging/__init__.pyR^s
cCs
||_dS(s8
        Set the logging level of this handler.
        N(R(RDR((s,/usr/local/lib/python2.5/logging/__init__.pytsetLevelescCs*|io
|i}nt}|i|S(s
        Format the specified record.

        If a formatter is set, use it. Otherwise, use the default formatter
        for the module.
        (RRrRn(RDR]RZ((s,/usr/local/lib/python2.5/logging/__init__.pyRnks

cCs
tddS(s
        Do whatever it takes to actually log the specified logging record.

        This version is intended to be implemented by subclasses and so
        raises a NotImplementedError.
        s.emit must be implemented by Handler subclassesN(tNotImplementedError(RDR]((s,/usr/local/lib/python2.5/logging/__init__.pytemitxscCsG|i|}|o-|iz|i|Wd|iXn|S(s<
        Conditionally emit the specified logging record.

        Emission depends on filters which may have been added to the handler.
        Wrap the actual emission of the record with acquisition/release of
        the I/O thread lock. Returns whether the filter passed the record for
        emission.
        N(RyRRR(RDR]RU((s,/usr/local/lib/python2.5/logging/__init__.pythandles	
cCs
||_dS(s5
        Set the formatter for this handler.
        N(R(RDRZ((s,/usr/local/lib/python2.5/logging/__init__.pytsetFormatterscCsdS(s
        Ensure all logging output has been flushed.

        This version does nothing and is intended to be implemented by
        subclasses.
        N((RD((s,/usr/local/lib/python2.5/logging/__init__.pytflushscCs.tzt|=ti|WdtXdS(s 
        Tidy up any resources used by the handler.

        This version does removes the handler from an internal list
        of handlers which is closed when shutdown() is called. Subclasses
        should ensure that this gets called from overridden close()
        methods.
        N(RRRR~R(RD((s,/usr/local/lib/python2.5/logging/__init__.pyRfs

cCsFto;ti}ti|d|d|ddti~ndS(sD
        Handle errors which occur during an emit() call.

        This method should be called from handlers when an exception is
        encountered during an emit() call. If raiseExceptions is false,
        exceptions get silently ignored. This is what is mostly wanted
        for a logging system - most users will not care about errors in
        the logging system, they are more interested in application errors.
        You could, however, replace this with a custom handler if you wish.
        The record which was being processed is passed in to this method.
        iiiN(traiseExceptionsRR2RcRdR3tstderr(RDR]Rg((s,/usr/local/lib/python2.5/logging/__init__.pythandleErrors((RNRORPRRGRRRRRnRRRRRfR(((s,/usr/local/lib/python2.5/logging/__init__.pyR4s						
	
					t
StreamHandlercBs,eZdZddZdZdZRS(s
    A handler class which writes logging records, appropriately formatted,
    to a stream. Note that this class does not close the stream, as
    sys.stdout or sys.stderr may be used.
    cCs=ti||djo
ti}n||_d|_dS(s`
        Initialize the handler.

        If strm is not specified, sys.stderr is used.
        N(RRGR3RRtstreamR(RDtstrm((s,/usr/local/lib/python2.5/logging/__init__.pyRGs



	cCs|iidS(s%
        Flushes the stream.
        N(RR(RD((s,/usr/local/lib/python2.5/logging/__init__.pyRsc	Csy|i|}d}ttdp|ii||nLy|ii||Wn0tj
o$|ii||idnX|iWn/tt	fj
o
n|i
|nXdS(sk
        Emit a record.

        If a formatter is specified, it is used to format the record.
        The record is then written to the stream with a trailing newline
        [N.B. this may be removed depending on feedback]. If exception
        information is present, it is formatted using
        traceback.print_exception and appended to the stream.
        s%s
RIsUTF-8N(RnRBR&RtwriteRLtencodeRtKeyboardInterruptt
SystemExitR(RDR]R#tfs((s,/usr/local/lib/python2.5/logging/__init__.pyRs
"N(RNRORPR3RGRR(((s,/usr/local/lib/python2.5/logging/__init__.pyRs	tFileHandlercBs&eZdZdddZdZRS(sO
    A handler class which writes formatted logging records to disk files.
    tacCs~tdjo
d}n|djot||}nti|||}ti||tii||_||_	dS(sO
        Open the specified file and use it as the stream for logging.
        N(
tcodecsR3topenRRGR,R-tabspathtbaseFilenametmode(RDR/RtencodingR((s,/usr/local/lib/python2.5/logging/__init__.pyRGs


cCs(|i|iiti|dS(s$
        Closes the stream.
        N(RRRfR(RD((s,/usr/local/lib/python2.5/logging/__init__.pyRfs

N(RNRORPR3RGRf(((s,/usr/local/lib/python2.5/logging/__init__.pyRstPlaceHoldercBs eZdZdZdZRS(s
    PlaceHolder instances are used in the Manager logger hierarchy to take
    the place of nodes for which no loggers have been defined. This class is
    intended for internal use only and not as part of the public API.
    cCshd|<|_dS(sY
        Initialize with the specified logger being a child of this placeholder.
        N(R3t	loggerMap(RDtalogger((s,/usr/local/lib/python2.5/logging/__init__.pyRGscCs(|ii|pd|i|<ndS(sJ
        Add the specified logger as a child of this placeholder.
        N(Rthas_keyR3(RDR((s,/usr/local/lib/python2.5/logging/__init__.pyR|$s(RNRORPRGR|(((s,/usr/local/lib/python2.5/logging/__init__.pyRs	cCs?|tjo(t|tptd|iq5n|adS(s
    Set the class to be used when instantiating a logger. The class should
    define __init__() such that only a name argument is required, and the
    __init__() should call Logger.__init__()
    s(logger not derived from logging.Logger: N(tLoggert
issubclasst	TypeErrorRNt_loggerClass(tklass((s,/usr/local/lib/python2.5/logging/__init__.pytsetLoggerClass2s

cCstS(sB
    Return the class to be used when instantiating a logger.
    (R(((s,/usr/local/lib/python2.5/logging/__init__.pytgetLoggerClass?stManagercBs2eZdZdZdZdZdZRS(st
    There is [under normal circumstances] just one Manager instance, which
    holds the hierarchy of loggers.
    cCs(||_d|_d|_h|_dS(sT
        Initialize the manager with the root node of the logger hierarchy.
        iN(troottdisabletemittedNoHandlerWarningt
loggerDict(RDtrootnode((s,/usr/local/lib/python2.5/logging/__init__.pyRGKs			cCsd}tz|ii|oj|i|}t|toI|}t|}||_||i|<|i|||i	|qn0t|}||_||i|<|i	|Wdt
X|S(s
        Get a logger with the specified name (channel name), creating it
        if it doesn't yet exist. This name is a dot-separated hierarchical
        name, such as "a", "a.b", "a.b.c" or similar.

        If a PlaceHolder existed for the specified name [i.e. the logger
        didn't exist but a child of it did], replace it with the created
        logger and fix up the parent/child references which pointed to the
        placeholder to now point to the logger.
        N(R3RRRt
isinstanceRRtmanagert_fixupChildrent
_fixupParentsR(RDR"RUtph((s,/usr/local/lib/python2.5/logging/__init__.pyt	getLoggerTs$
	
	
cCs|i}ti|d}d}x|djo|o|| }|ii|pt||i|<nL|i|}t|to
|}n%t|tpt	|i
|ti|dd|d}q$W|p
|i}n||_dS(s
        Ensure that there are either loggers or placeholders all the way
        from the specified logger to the root of the logger hierarchy.
        RxiiN(
R"RktrfindR3RRRRRtAssertionErrorR|Rtparent(RDRR"tiRUtsubstrtobj((s,/usr/local/lib/python2.5/logging/__init__.pyRts"	



!
cCsc|i}t|}xG|iiD]6}|ii| |jo|i|_||_q%q%WdS(sk
        Ensure that children of the placeholder ph are connected to the
        specified logger.
        N(R"R$RtkeysR(RDRRR"tnamelentc((s,/usr/local/lib/python2.5/logging/__init__.pyRs	(RNRORPRGRRR(((s,/usr/local/lib/python2.5/logging/__init__.pyRFs
			 	RcBseZdZedZdZdZdZdZeZ	dZ
dZdZeZ
d	Zd
ZdddZdddZd
ZdZdZdZdZdZRS(sr
    Instances of the Logger class represent a single logging channel. A
    "logging channel" indicates an area of an application. Exactly how an
    "area" is defined is up to the application developer. Since an
    application can have any number of areas, logging channels are identified
    by a unique string. Application areas can be nested (e.g. an area
    of "input processing" might include sub-areas "read CSV files", "read
    XLS files" and "read Gnumeric files"). To cater for this natural nesting,
    channel names are organized into a namespace hierarchy where levels are
    separated by periods, much like the Java or Python package namespace. So
    in the instance given above, channel names might be "input" for the upper
    level, and "input.csv", "input.xls" and "input.gnu" for the sub-levels.
    There is no arbitrary limit to the depth of nesting.
    cCsGti|||_||_d|_d|_g|_d|_dS(sJ
        Initialize the logger with a name and an optional level.
        iiN(	RzRGR"RR3Rt	propagatethandlerstdisabled(RDR"R((s,/usr/local/lib/python2.5/logging/__init__.pyRGs
					cCs
||_dS(s7
        Set the logging level of this logger.
        N(R(RDR((s,/usr/local/lib/python2.5/logging/__init__.pyRscOsR|iitjodSnt|ijo t|it||f|ndS(s
        Log 'msg % args' with severity 'DEBUG'.

        To pass exception information, use the keyword argument exc_info with
        a true value, e.g.

        logger.debug("Houston, we have a %s", "thorny problem", exc_info=1)
        N(RRRtgetEffectiveLeveltapplyt_log(RDR#R(tkwargs((s,/usr/local/lib/python2.5/logging/__init__.pytdebugs	cOsR|iitjodSnt|ijo t|it||f|ndS(s
        Log 'msg % args' with severity 'INFO'.

        To pass exception information, use the keyword argument exc_info with
        a true value, e.g.

        logger.info("Houston, we have a %s", "interesting problem", exc_info=1)
        N(RRR
RRR(RDR#R(R((s,/usr/local/lib/python2.5/logging/__init__.pytinfos	cOsO|iitjodSn|ito t|it||f|ndS(s
        Log 'msg % args' with severity 'WARNING'.

        To pass exception information, use the keyword argument exc_info with
        a true value, e.g.

        logger.warning("Houston, we have a %s", "bit of a problem", exc_info=1)
        N(RRRtisEnabledForRR(RDR#R(R((s,/usr/local/lib/python2.5/logging/__init__.pytwarnings	cOsO|iitjodSn|ito t|it||f|ndS(s
        Log 'msg % args' with severity 'ERROR'.

        To pass exception information, use the keyword argument exc_info with
        a true value, e.g.

        logger.error("Houston, we have a %s", "major problem", exc_info=1)
        N(RRRRRR(RDR#R(R((s,/usr/local/lib/python2.5/logging/__init__.pyterrors	cGs't|i|f|hdd<dS(sU
        Convenience method for logging an ERROR with exception information.
        iR2N(RR(RDR#R(((s,/usr/local/lib/python2.5/logging/__init__.pyt	exceptionscOsR|iitjodSnt|ijo t|it||f|ndS(s
        Log 'msg % args' with severity 'CRITICAL'.

        To pass exception information, use the keyword argument exc_info with
        a true value, e.g.

        logger.critical("Houston, we have a %s", "major disaster", exc_info=1)
        N(RRR
RRR(RDR#R(R((s,/usr/local/lib/python2.5/logging/__init__.pytcriticals	cOst|tijoto
tdq2dSn|ii|jodSn|i|o t|i	|||f|ndS(s
        Log 'msg % args' with the integer severity 'level'.

        To pass exception information, use the keyword argument exc_info with
        a true value, e.g.

        logger.log(level, "We have a %s", "mysterious problem", exc_info=1)
        slevel must be an integerN(
R%R&tIntTypeRRRRRRR(RDRR#R(R((s,/usr/local/lib/python2.5/logging/__init__.pytlogs	
cCsti}d}xft|doU|i}tii|i}|tjo|i}qn||i	|i
f}PqW|S(s
        Find the stack frame of the caller so that we can note the source
        file name, line number and function name.
        s(unknown file)is(unknown function)tf_code(s(unknown file)is(unknown function)(RRRBRR,R-tnormcasetco_filenamet_srcfiletf_linenotco_name(RDRRUtcoR/((s,/usr/local/lib/python2.5/logging/__init__.pyt
findCaller"s	
	c
	Cst||||||||}
|	oWxT|	D]H}|djp||
ijotd|n|	||
i|<q/Wn|
S(sr
        A factory method which can be overridden in subclasses to create
        specialized LogRecords.
        RjRms$Attempt to overwrite %r in LogRecord(smessagesasctime(RRRtKeyError(RDR"RtfntlnoR#R(R2REtextraRUtkey((s,/usr/local/lib/python2.5/logging/__init__.pyt
makeRecord3s!c

Csto|i\}}}nd\}}}|o*t|tijoti}q`n|i|i||||||||	}	|i	|	dS(s
        Low-level logging routine which creates a LogRecord and then calls
        all the handlers of this logger to handle the record.
        s(unknown file)is(unknown function)N(s(unknown file)is(unknown function)(
RRR%R&t	TupleTypeRR2RR"R(
RDRR#R(R2RRRRER]((s,/usr/local/lib/python2.5/logging/__init__.pyR@s*cCs0|io!|i|o|i|ndS(s
        Call the handlers for the specified record.

        This method is used for unpickled records received from a socket, as
        well as those created locally. Logger-level filtering is applied.
        N(RRytcallHandlers(RDR]((s,/usr/local/lib/python2.5/logging/__init__.pyROscCs(||ijo|ii|ndS(s;
        Add the specified handler to this logger.
        N(RR|(RDthdlr((s,/usr/local/lib/python2.5/logging/__init__.pyt
addHandlerYscCsD||ijo0|iz|ii|Wd|iXndS(s@
        Remove the specified handler from this logger.
        N(RRR~R(RDR((s,/usr/local/lib/python2.5/logging/__init__.pyt
removeHandler`s

cCs|}d}xk|ocx?|iD]4}|d}|i|ijo|i|q q W|ip
d}q|i}qW|djo<to5|ii	o't
iid|i
d|i_	ndS(s
        Pass a record to all relevant handlers.

        Loop through all handlers for this logger and its parents in the
        logger hierarchy. If no handler was found, output a one-off error
        message to sys.stderr. Stop searching up the hierarchy whenever a
        logger with the "propagate" attribute set to zero is found - that
        will be the last logger whose handlers are called.
        iis+No handlers could be found for logger "%s"
N(RR*RRRR3RRRRRRRR"(RDR]RtfoundR((s,/usr/local/lib/python2.5/logging/__init__.pyRls 




"cCs7|}x*|o"|io|iSn|i}q	WtS(s
        Get the effective level for this logger.

        Loop through this logger and its parents in the logger hierarchy,
        looking for a non-zero logging level. Return the first one found.
        (RRR(RDtlogger((s,/usr/local/lib/python2.5/logging/__init__.pyRs
cCs+|ii|jodSn||ijS(s;
        Is this logger enabled for level 'level'?
        i(RRR(RDR((s,/usr/local/lib/python2.5/logging/__init__.pyRsN(RNRORPRRGRRRRtwarnRRRtfatalRRR3RRRRRRRR(((s,/usr/local/lib/python2.5/logging/__init__.pyRs*									
	
				t
RootLoggercBseZdZdZRS(s
    A root logger is not that different to any other logger, except that
    it must have a logging level and there is only one instance of it in
    the hierarchy.
    cCsti|d|dS(s=
        Initialize the logger with the name "root".
        RN(RRG(RDR((s,/usr/local/lib/python2.5/logging/__init__.pyRGs(RNRORPRG(((s,/usr/local/lib/python2.5/logging/__init__.pyRss"%(levelname)s:%(name)s:%(message)sc	Ksttidjo|id}|o%|idd}t||}n|id}t|}|idt}|idd	}t||}|i	|ti
||id}|d	j	oti|qnd	S(
s
    Do basic configuration for the logging system.

    This function does nothing if the root logger already has handlers
    configured. It is a convenience method intended for use by simple scripts
    to do one-shot configuration of the logging package.

    The default behaviour is to create a StreamHandler which writes to
    sys.stderr, set a formatter using the BASIC_FORMAT format string, and
    add the handler to the root logger.

    A number of optional keyword arguments may be specified, which can alter
    the default behaviour.

    filename  Specifies that a FileHandler be created, using the specified
              filename, rather than a StreamHandler.
    filemode  Specifies the mode to open the file, if filename is specified
              (if filemode is unspecified, it defaults to 'a').
    format    Use the specified format string for the handler.
    datefmt   Use the specified date/time format.
    level     Set the root logger level to the specified level.
    stream    Use the specified stream to initialize the StreamHandler. Note
              that this argument is incompatible with 'filename' - if both
              are present, 'stream' is ignored.

    Note that you could specify a stream created using open(filename, mode)
    rather than passing the filename and mode in. However, it should be
    remembered that StreamHandler does not close its stream (since it may be
    using sys.stdout or sys.stderr), whereas FileHandler closes its stream
    when the handler is closed.
    iR/tfilemodeRRRnRYRN(R$RRRRRtBASIC_FORMATR3RWRRR(	RR/RRRRtdfsRZR((s,/usr/local/lib/python2.5/logging/__init__.pytbasicConfigs 


cCs#|otii|SntSdS(s
    Return a logger with the specified name, creating it if necessary.

    If no name is specified, return the root logger.
    N(RRRR(R"((s,/usr/local/lib/python2.5/logging/__init__.pyRscOs?ttidjotntti|f||dS(sD
    Log a message with severity 'CRITICAL' on the root logger.
    iN(R$RRRRR(R#R(R((s,/usr/local/lib/python2.5/logging/__init__.pyRscOs?ttidjotntti|f||dS(sA
    Log a message with severity 'ERROR' on the root logger.
    iN(R$RRRRR(R#R(R((s,/usr/local/lib/python2.5/logging/__init__.pyRscGs$tt|f|hdd<dS(sa
    Log a message with severity 'ERROR' on the root logger,
    with exception information.
    iR2N(RR(R#R(((s,/usr/local/lib/python2.5/logging/__init__.pyRscOs?ttidjotntti|f||dS(sC
    Log a message with severity 'WARNING' on the root logger.
    iN(R$RRRRR(R#R(R((s,/usr/local/lib/python2.5/logging/__init__.pyRscOs?ttidjotntti|f||dS(s@
    Log a message with severity 'INFO' on the root logger.
    iN(R$RRRRR(R#R(R((s,/usr/local/lib/python2.5/logging/__init__.pyR!scOs?ttidjotntti|f||dS(sA
    Log a message with severity 'DEBUG' on the root logger.
    iN(R$RRRRR(R#R(R((s,/usr/local/lib/python2.5/logging/__init__.pyR)scOsBttidjotntti||f||dS(sP
    Log 'msg % args' with the integer severity 'level' on the root logger.
    iN(R$RRRRR(RR#R(R((s,/usr/local/lib/python2.5/logging/__init__.pyR1scCs|ti_dS(s=
    Disable all logging calls less severe than 'level'.
    N(RRR(R((s,/usr/local/lib/python2.5/logging/__init__.pyR9scCsFx?|D]6}y|i|iWqtoq>qXqWdS(s
    Perform any cleanup actions in the logging system (e.g. flushing
    buffers).

    Should be called at application exit.
    N(RRfR(thandlerListth((s,/usr/local/lib/python2.5/logging/__init__.pytshutdown?s
cCsztWd||XdS(N(R(tstatustold_exit((s,/usr/local/lib/python2.5/logging/__init__.pytexithookVs(s.pycs.pyo((((((((RRPRR,R&R!RkRaRcRtImportErrorR3RRt
__author__t
__status__t__version__t__date__RBtsept__file__RtlowerR-RRR:RR<RAR
tFATALRRRR
RRRRRRRRRRVRWRrRpRvRzRRRRRRRRRRRRRRRRRRRRRRRRRRRRtatexittregistertexitR(((s,/usr/local/lib/python2.5/logging/__init__.pys<module>sT
	


																W		*%,2 	
	X		6								

Man Man