|Subject:||Issue with Log::Dispatch::Config/Log::Dispatch::Email::MailSend under CentOS/RHEL 5.x|
|Date:||Mon, 20 Jun 2011 15:29:04 -0400|
|To:||<bug-Log-Dispatch-Config [...] rt.cpan.org>|
|From:||"Todd Green" <todd.green [...] irondata.com>|
I'd like to report an issue with the use of Log::Dispatch::Config and Log::Dispatch::Email::MailSend under CentOS/RHEL 5.x using perl 5.10.0, 5.12.0, 5.12.1 and 5.14.0. I've been using these two modules without any issues under various versions of 3.x and 4.x CentOS/RHEL using perl 5.8.8 and below. Recently I attempted to run one of the scripts under perl 5.12.1 on CentOS 5.6 and received the following error: Can't locate object method "open" via package "Mail::Mailer::sendmail" at /usr/local/lib/perl5/site_perl/5.12.1/Mail/Send.pm line 58 during global destruction. After a number of tests I isolated the issue down to the use of Log::Dispatch::Config. I have included two test scripts and a sample log configuration file. Script #1 uses Log::Dispatch::Config and the config file. Script #2 accomplishes the same thing without the use Log::Dispatch::Config. Script #1 fails with the above error. Script #2 does not fail. I have also duplicated the behavior on perl 5.10.0, 5.12.0 and 5.14.1 on various CentOS/RHEL 5.x platforms. I suspect at this point it is related to perl versions 5.10.x and higher since I tried it against 5.8.8 distributed with CentOS 5.6 and both worked without issue. Any guidance you can provide would be appreciated. ==== Script #1 ==== #!/usr/local/bin/perl -w use Log::Dispatch::Config; my $conf_file = 'test_log.conf'; # Start up logging Log::Dispatch::Config->configure($conf_file); my $log = Log::Dispatch::Config->instance; $log->debug('Testing'); ==== test_log.conf ==== dispatchers = email email.class = Log::Dispatch::Email::MailSend email.min_level = debug email.to = email@example.com email.from = firstname.lastname@example.org email.subject = Test Logging email.format = %m%n ==== Script #2 ==== #!/usr/local/bin/perl use Log::Dispatch; use Log::Dispatch::Email::MailSend; my $log = Log::Dispatch->new(); $log->add( Log::Dispatch::Email::MailSend->new( name => 'email', min_level => 'debug', to => [qw( email@example.com )], from => 'firstname.lastname@example.org', subject => 'Test Logging', format => '%m%n' ) ); $log->debug('Testing'); Show quoted text
________________________________ Todd A. Green │ Systems Engineer │ 3400 Players Club Parkway Suite 300 Memphis, TN 38125 │ 901.271.1863 Direct │ 901.755.0110 Main| 901. 339.7977 Fax │ email@example.com <imap://firstname.lastname@example.org:email@example.com> www.irondata.com IRONDATA uses Intelligent Process Management to Improve Efficiency, Reduce Redundant Workload, Increase Productivity and Automate Workflow. The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. This message may be a work product and as such is privileged and confidential. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message.
Message body is not shown because it is too large.