From: Mike S. <msc...@ao...> - 2003-08-09 19:32:06
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body bgcolor="#ffffff"> <font face="Arial,sans-serif"><font size="2">These Log::Dispatch::Email all feature a flag "buffered" which defaults to "1", causing unwanted buffering at times. Log::Log4perl allows you to pass on any option the appender supports via the configuration file. What you might want to do is set<br> <br> log4perl.appender.Mailer.buffered = 0<br> <br> which will turn off the default buffering and send emails right away, given that you named your email appender "Mailer" in the log4perl configuration file.<br> <br> </font></font><font face="Arial,sans-serif" size="2"><font size="2"><span id="x-photon-sig-117638148">-- <br> -- Mike<br> Mike Schilli<br> <a class="moz-txt-link-abbreviated" href="mailto:m...@pe...">m...@pe...</a><br> <br> </span></font></font><font face="Arial,sans-serif"><font size="2"><span type="cite">Todd Lorenz wrote:</span> </font></font> <p><font face="Arial,sans-serif" size="2"></font></p> <blockquote type="cite" ><font face="Arial,sans-serif" size="2"></font> <div><font face="Arial" size="2">I see that Log::Dispatch::Email confers email message buffering, storing up all logged messages until the buffer is flushed. A flush occurs upon destruction of the appender object, and I don't see any explicit flushing done by the Log::Dispatch::Email subclasses.</font></div> <font face="Arial,sans-serif" size="2"></font> <div><font face="Arial,sans-serif" size="2"> </font></div> <font face="Arial,sans-serif" size="2"></font> <div><font face="Arial" size="2">This doesn't work so well for long-running programs or daemons. Is there a way to control the buffering behavior of Log::Dispatch::Email through the log4perl init() interface?</font></div> <font face="Arial,sans-serif" size="2"></font> <div><font face="Arial,sans-serif" size="2"> </font></div> </blockquote> <font face="Arial,sans-serif"><font size="2"><span id="x-photon-sig-117638148"></span></font></font> </body> </html> |