��
��Pc @swdZddkZddkZddkZddklZddklZddkl Z dZ
dd d��YZdS(
sDFile-based logger, writes to named category files in mm_cfg.LOG_DIR.i����N(t
StringType(tmm_cfg(t_logexcs
iso-8859-1tLoggercBsVeZddd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Z RS(
iicCs\tiiti|�|_d|_||_t p
t
i�|_|o|i
�ndS(s{nofail says to fallback to sys.__stderr__ if write fails to
category file - a complaint message is emitted, but no exception is
raised. Set nofail=0 if you want to handle the error in your code,
instead.
immediate=1 says to create the log file on instantiation.
Otherwise, the file is created only when there are writes pending.
N(tostpathtjoinRtLOG_DIRt_Logger__filenametNonet_Logger__fpt_Logger__nofailtLOG_ENCODINGtsystgetdefaultencodingt_Logger__encodingt_Logger__get_f(tselftcategorytnofailt immediate((s_/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Logging/Logger.pyt__init__$s cCs|i�dS(N(tclose(R((s_/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Logging/Logger.pyt__del__4scCsd|ii|i
fS(Ns
<%s to %s>(t __class__t__name__R(R((s_/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Logging/Logger.pyt__repr__7scCs�|io|iSy�tid�}z]y%ti|id|idd�}Wn(tj
ot|idd�}nX||_Wdti|�XWnCtj
o7}|i o!t
||�ti}|_q��nX|SdS(Nisa+treplacei(
R
RtumasktcodecstopenRRtLookupErrortIOErrorRRR
t
__stderr__(Rtoutfte((s_/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Logging/Logger.pyt__get_f:s&
cCs.|i�}t|d�o|i�ndS(Ntflush(RthasattrR&(RR#((s_/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Logging/Logger.pyR&RscCsot|t�ot||id�}n|i�}y|i|�Wn"tj
o}t||�nXdS(NR(t
isinstanceRtunicodeRRtwriteR R(RtmsgR#((s_/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Logging/Logger.pyR*WscCs"x|D]}|i|�qWdS(N(R*(Rtlinestl((s_/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Logging/Logger.pyt
writelines`scCs,|ipdS|i�i�d|_dS(N(R
RRR (R((s_/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Logging/Logger.pyRds
(
Rt
__module__RRRRR&R*R.R(((s_/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Logging/Logger.pyR#s ((t__doc__R
RRttypesRtMailmanRtMailman.Logging.UtilsRRR(((s_/builddir/build/BUILDROOT/mailman-2.1.12-18.el6.i386//usr/lib/mailman/Mailman/Logging/Logger.pyt<module>s