|
From: Robert J. <yad...@sn...> - 2007-01-08 14:50:48
|
I'm having a problem adding new configuration items to my subclass --
is it possible without copying the code from Appender::DBI::new() to
add a new configuration item? The code I tried (below) didn't work
-- the new option "LOGBUFFER" did not appear because the %defaults
hash in DBI.pm is basically throwing it away.
I would basically like to use the existing new() method in
Appender::DBI, so I'm calling SUPER::new() in my subclass.
-----BEGIN subclass DBI_Buffer
package DBI_Buffer;
use base ("Log::Log4perl::Appender::DBI");
use strict;
use warnings;
sub new {
my ($class, %options) = @_;
my $self = {
LOGBUFFER => 2000,
%options,
};
bless $self, $class;
return $self->SUPER::new(%options);
}
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Robert Jacobson ..........................
Flight Ops. Team Solar Dynamics Observatory (SDO)
............. ..............
|