On Tue, 24 Feb 2009, Robert Jacobson wrote: > Those are mostly the expected values from the Layout I specified > (time, log level, script name, hostname, PID, ?????, message).
That's peculiar ... what does your layout look like? It's hard to diagnose the problem without code that reproduces it, can you post a stripped-down version of your appender? -- Mike Mike Schilli m...@perlmeister.com > Robert Jacobson wrote: > >> If I add equivalent code to my existing conditional for the definition >> of errorappender, i.e.: >> >> if ($self->{errorappender}) { >> # Pass back the appender to be synchronized as a dependency >> # to the configuration file parser >> push @{$p{l4p_depends_on}}, $self->{errorappender}; >> push @{$p{l4p_post_config_subs}}, sub { $self->post_init() }; >> } >> >> Then I get this error from Log::Log4perl::Appender::DBI: >> >> Log4perl: DBI appender failed to reconnect to database after 1 attempt >> at init_and_watch.pl line 10 > > I added some debug to DBI.pm and found that when I add the "depends_on" > code, the sub in DBI query_execute gets called with extra arguments. I > turned on the warn to print out the DBI::errstr and found that it isn't > really a connection error, it's a failure to execute the DBI statement: > > Exe: failed: called with 7 bind variables when 6 are needed at > .../Log/Log4perl/Appender/DBI.pm line 159. > > (line number different because of my local edits to DBI.pm) > > Adding a "Dumper" for qmarks: > > $VAR1 = '2009-055/17:35:41'; > $VAR2 = 'INFO'; > $VAR3 = 'component.pl'; > $VAR4 = 'ansdev2'; > $VAR5 = '25227'; > $VAR6 = 'ARRAY(0x813274c)'; > $VAR7 = 'Starting ....'; > ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ log4perl-devel mailing list log4perl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/log4perl-devel