diff options
| author | fukachan <fukachan> | 2006-03-26 14:56:17 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-03-26 14:56:17 +0000 |
| commit | 1ec41964df136ca850e388b3987e71f3fe1c58e6 (patch) | |
| tree | 80adc7586e8b5ad44d357f9c6b24566b47a1f312 /fml | |
| parent | 323380bed2b193834604d9dd35c1b5897bf703ba (diff) | |
| download | fml8-1ec41964df136ca850e388b3987e71f3fe1c58e6.tar.gz fml8-1ec41964df136ca850e388b3987e71f3fe1c58e6.tar.bz2 fml8-1ec41964df136ca850e388b3987e71f3fe1c58e6.zip | |
use $curproc->log() as log_info and $curproc->logdebug() as log_debug
in Mail::Delivery, by passing log_debug function pointer to
Mail::Delivery class.
Diffstat (limited to 'fml')
| -rw-r--r-- | fml/lib/FML/Mailer.pm | 7 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Distribute.pm | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/fml/lib/FML/Mailer.pm b/fml/lib/FML/Mailer.pm index 6a25d13e..64c5f88c 100644 --- a/fml/lib/FML/Mailer.pm +++ b/fml/lib/FML/Mailer.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Mailer.pm,v 1.33 2006/03/21 07:04:07 fukachan Exp $ +# $FML: Mailer.pm,v 1.34 2006/03/25 04:07:26 fukachan Exp $ # package FML::Mailer; @@ -97,6 +97,7 @@ sub send my $handle = undef; my $fp_log_info = undef; my $fp_log_error = undef; + my $fp_log_debug = undef; my $fp_smtplog = undef; my $maintainer = undef; my $curproc = $self->{ _curproc }; @@ -109,8 +110,9 @@ sub send $maintainer = $config->{ maintainer } if defined $config; # default log functions - $fp_log_info = sub { $curproc->logdebug(@_);}; + $fp_log_info = sub { $curproc->log(@_);}; $fp_log_error = sub { $curproc->logerror(@_);}; + $fp_log_debug = sub { $curproc->logdebug(@_);}; $fp_smtplog = sub { my ($s) = @_; print $s; print "\n" if $s !~ /\n$/o; }; @@ -213,6 +215,7 @@ sub send my $service = new Mail::Delivery { log_info_function => $fp_log_info, log_error_function => $fp_log_error, + log_debug_function => $fp_log_debug, smtp_log_function => $fp_smtplog, smtp_log_handle => $handle, address_validate_function => $validater, diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm index 87c7362e..9a88543f 100644 --- a/fml/lib/FML/Process/Distribute.pm +++ b/fml/lib/FML/Process/Distribute.pm @@ -3,7 +3,7 @@ # Copyright (C) 2000,2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Distribute.pm,v 1.171 2006/03/21 07:04:07 fukachan Exp $ +# $FML: Distribute.pm,v 1.172 2006/03/25 04:07:26 fukachan Exp $ # package FML::Process::Distribute; @@ -598,8 +598,9 @@ sub _deliver_article } # 2. distribute article - my $fp_log_info = sub { $curproc->logdebug(@_);}; + my $fp_log_info = sub { $curproc->log(@_);}; my $fp_log_error = sub { $curproc->logerror(@_);}; + my $fp_log_debug = sub { $curproc->logdebug(@_);}; my $fp_smtplog = sub { my ($s) = @_; print $s; print "\n" if $s !~ /\n$/o; }; @@ -635,6 +636,7 @@ sub _deliver_article $service = new Mail::Delivery { log_info_function => $fp_log_info, log_error_function => $fp_log_error, + log_debug_function => $fp_log_debug, smtp_log_function => $fp_smtplog, smtp_log_handle => $handle, address_validate_function => $validater, |
