Re: [log4perl-devel] log4perl buffering with semi persistent scripts

2011-12-07 Thread Danny Dev
You didn't mention the email appender that you are using, specific
solutions would require looking into the appender's documentation and
figure out if it provides a method to flush buffered/pending messages.

If that's available, then I'd recommend encapsulating request handling
into a function scope and run a flush() at the end.

thanks for the reply, 


I'm using Log::Dispatch::Email::MailSend which doesn't implement its own flush 
method. I took at look at all of the available Email appenders and none of them 
do, it's only in the base class but actually the base class method appears to 
do the job.
I'm not clear on how I call that directly however since I can't  call it 
against the object returned by get_logger and I have to pass it the correct 
object if  I call it directly

Log::Dispatch::Email::flush(???)

cheers


--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel


Re: [log4perl-devel] log4perl buffering with semi persistent scripts

2011-12-07 Thread Danny Dev
Ahh may have found it, it looks like 


http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#92664

using appender_by_name lets me call flush on it

cheers



- Original Message -
From: Danny Dev dannydev...@yahoo.com
To: Mike Schilli m...@perlmeister.com
Cc: log4perl-devel@lists.sourceforge.net 
log4perl-devel@lists.sourceforge.net
Sent: Wednesday, December 7, 2011 9:19 AM
Subject: Re: [log4perl-devel] log4perl buffering with semi persistent  scripts

You didn't mention the email appender that you are using, specific
solutions would require looking into the appender's documentation and
figure out if it provides a method to flush buffered/pending messages.

If that's available, then I'd recommend encapsulating request handling
into a function scope and run a flush() at the end.

thanks for the reply, 


I'm using Log::Dispatch::Email::MailSend which doesn't implement its own flush 
method. I took at look at all of the available Email appenders and none of them 
do, it's only in the base class but actually the base class method appears to 
do the job.
I'm not clear on how I call that directly however since I can't  call it 
against the object returned by get_logger and I have to pass it the correct 
object if  I call it directly

Log::Dispatch::Email::flush(???)

cheers

--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel