Viewing File: /usr/local/cpanel/3rdparty/mailman/Mailman/Logging/StampedLogger.pyc

ó
)¿Úhc@sBddlZddlZddlmZdefd„ƒYZdS(iÿÿÿÿN(tLoggert
StampedLoggercBs>eZdZddddd„Zd„Zd„Zd„ZRS(sFRecord messages in log files, including date stamp and optional label.

    If manual_reprime is on (off by default), then timestamp prefix will
    included only on first .write() and on any write immediately following a
    call to the .reprime() method.  This is useful for when StampedLogger is
    substituting for sys.stderr, where you'd like to see the grouping of
    multiple writes under a single timestamp (and there is often is one group,
    for uncaught exceptions where a script is bombing).

    In any case, the identifying prefix will only follow writes that start on
    a new line.

    Nofail (by default) says to fallback to sys.stderr if write fails to
    category file.  A message is emitted, but the IOError is caught.
    Initialize with nofail=0 if you want to handle the error in your code,
    instead.

    iicCs>||_||_d|_d|_tj||||ƒdS(s„If specified, optional label is included after timestamp.
        Other options are passed to the Logger class initializer.
        iN(t_StampedLogger__labelt_StampedLogger__manual_reprimet_StampedLogger__primedt_StampedLogger__bolRt__init__(tselftcategorytlabeltmanual_reprimetnofailt	immediate((sC/usr/local/cpanel/3rdparty/mailman/Mailman/Logging/StampedLogger.pyR+s
				cCs
d|_dS(s4Reset so timestamp will be included with next write.iN(R(R((sC/usr/local/cpanel/3rdparty/mailman/Mailman/Logging/StampedLogger.pytreprime6scCsæ|jsd}n‹|js%|jrRtjdtjtjƒƒƒ}d|_nd}|jdkrzdtj	ƒ}nd|jtj	ƒf}||}t
j|d||fƒ|rÙ|ddkrÙd	|_n	d|_dS(
Nts%b %d %H:%M:%S %Y is(%d)s%s(%d):s%s %siÿÿÿÿs
i(RRRttimetstrftimet	localtimeRtNonetostgetpidRtwrite(RtmsgtprefixtstampR	((sC/usr/local/cpanel/3rdparty/mailman/Mailman/Logging/StampedLogger.pyR:s			
cCstd}xg|D]_}|r/|j|ƒd}q
|r\|ddkr\tj|d|ƒq
tj||ƒq
WdS(Niit s	s
(Rs	s
(RR(Rtlinestfirsttl((sC/usr/local/cpanel/3rdparty/mailman/Mailman/Logging/StampedLogger.pyt
writelinesOs

	N(t__name__t
__module__t__doc__RRR
RR(((sC/usr/local/cpanel/3rdparty/mailman/Mailman/Logging/StampedLogger.pyRs	
		(RRtMailman.Logging.LoggerRR(((sC/usr/local/cpanel/3rdparty/mailman/Mailman/Logging/StampedLogger.pyt<module>s
Back to Directory File Manager