summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2006-03-26 14:56:17 +0000
committerfukachan <fukachan>2006-03-26 14:56:17 +0000
commit1ec41964df136ca850e388b3987e71f3fe1c58e6 (patch)
tree80adc7586e8b5ad44d357f9c6b24566b47a1f312
parent323380bed2b193834604d9dd35c1b5897bf703ba (diff)
downloadfml8-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.
-rw-r--r--fml/lib/FML/Mailer.pm7
-rw-r--r--fml/lib/FML/Process/Distribute.pm6
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,