I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-03-04 10:25:26-08 by monotoy
Mandatory parameter 'message' missing
hi, i have a problem with Log::Dispatch::DBI: trying to use it as follows:
BEGIN { our $VERSION = 1.0; my $driver = "mysql"; my $database = "eventlog"; my $hostname="127.0.0.1"; my $port='3306'; my $user='username'; my $password='passwd'; my $socket='/tmp/mysql.sock'; my $dsn = "DBI:$driver:database=$database;host=$hostname;port=$port;mysql_socket=$socket"; my $dblocal = DBI->connect($dsn, $user, $password) or die "couldn't connect: $DBI::errstr"; my $log = Log::Dispatch::DBI->new( name => 'dbi', min_level => 'info', dbh => $dblocal, ) or die "can't create new log"; $log->log(level => 'info', messsage => 'something BAD happened');
which gives me the following error:
Mandatory parameter 'message' missing in call to Log::Dispatch::Output::log at /usr/local/lib/perl/5.8.8/Params/ValidateXS.pm line 11 Params::Validate::__ANON__('Mandatory parameter \'message\' missing in call to Log::Dispa.. +.') called at /usr/local/share/perl/5.8.8/Log/Dispatch/Output.pm line 30 Log::Dispatch::Output::log('undef', 'level', 'info', 'messsage', 'something BAD happened') +called at firsttry.pl line 43 main::BEGIN() called at firsttry.pl line 94 eval {...} called at firsttry.pl line 94 BEGIN failed--compilation aborted at firsttry.pl line 94.
any idea what i could be doing wrong? many thanks in advance nico
Direct Responses: Write a response