mς AγΈEc@sΤdZdkZdkZdklZlZdklZlZdkl Z l Z dkl Z defd„ƒYZ de fd „ƒYZeid jo eZ nd efd „ƒYZd efd„ƒYZdS(s.Handlers which can plug into a PEP 282 logger.N(sHandlers StreamHandler(s SysLogHandlersBufferingHandler(s HTTPHandlers SMTPHandler(sNTEventLogHandlert FileHandlercBs,tZdZdd„Zd„Zd„ZRS(sΈFile handler which supports reopening of logs. Re-opening should be used instead of the 'rollover' feature of the FileHandler from the standard library's logging package. tacCsAtii|ƒ}ti|t||ƒƒ||_ ||_dS(N( tostpathtabspathtfilenamet StreamHandlert__init__tselftopentmodet baseFilename(RRR ((tC/data/zmath/zope/lib/python/ZConfig/components/logger/loghandler.pyR s cCs|iiƒdS(N(Rtstreamtclose(R((R R&scCs&|iƒt|i|iƒ|_dS(N(RRR R R R (R((R treopen)s (t__name__t __module__t__doc__RRR(((R Rs   tWin32FileHandlercBstZdZed„ZRS(s«File-based log handler for Windows that supports an additional 'rotate' method. reopen() is generally useless since Windows cannot do a move on an open file. cCsq|p|id}nd}|iƒyti|i|ƒWntj onXt |i|i ƒ|_ dS(Ns.last( trotateFilenameRR tNoneterrorRRtrenametOSErrorR R R (RRR((R trotate2s (RRRRR(((R R-s tntt NullHandlercBs tZdZd„Zd„ZRS(sHandler that does nothing.cCsdS(N((Rtrecord((R temitFscCsdS(N((RR((R thandleIs(RRRRR(((R RCs  tStartupHandlercBs)tZdZd„Zd„Zd„ZRS(s°Handler which stores messages in a buffer until later. This is useful at startup before we can know that we can safely write to a configuration-specified handler. cCsti|tiƒdS(N(tBufferingHandlerRRtsystmaxint(R((R RTscCstS(N(tFalse(RR((R t shouldFlushWscCs/x(|io|i|iidƒƒqWdS(Ni(RtbufferttargetRtpop(RR&((R t flushBufferToZs (RRRRR$R((((R RMs   (RRR!tloggingtHandlerRtlogging.handlerst SysLogHandlerR t HTTPHandlert SMTPHandlertNTEventLogHandlertWin32EventLogHandlerRRtnameRR( R0RRRR,R!R R*R.RRRR-((R t?s