Perl error while merging two XML logs
Francis J. Lacoste
flacoste at logreport.org
Sun Feb 16 18:55:10 CET 2003
On mer, 2003-02-12 at 11:48, Francis J. Lacoste wrote:
> On mer, 2003-02-12 at 02:24, Paul Weissmann wrote:
>
> > iirc lire-full-1.2.1; how do I find out for sure?
> >
>
> Running lr_log2report -v will confirm this.
>
> BTW, I'v tested creating an ipchains report and merging it with
> itself here and I've got the same error as you. Both in version 1.2.1
> and current CVS. I'll investigate this and post a patch to the list
> once the bug is squashed. (We are still a few weeks away from releasing
> current CVS).
>
I'm attaching the patch which solves merging of reports containing
missing subreports.
You should apply the patch by running
$ patch -p0 < subreport.patch
in the top-level directory of the extracted *source* tarball.
You'll need to do a
$ make install
after this.
You should be able to merge your ipchains reports after that.
Thanks for finding this problem!
Francis J. Lacoste
--
Francis J. Lacoste . . http://www.logreport.org
/^LogReport$/ . . flacoste at logreport.org
-------------- next part --------------
=== cd /home/francis/src/logreport/lire-unstable/all/lib/Lire/Report/
=== /usr/bin/cvs diff -u Subreport.pm
Index: all/lib/Lire/Report/Subreport.pm
===================================================================
RCS file: /cvsroot/logreport/service/all/lib/Lire/Report/Subreport.pm,v
retrieving revision 1.15
diff -u -b -u -r1.15 all/lib/Lire/Report/Subreport.pm
--- all/lib/Lire/Report/Subreport.pm 7 Feb 2003 23:33:21 -0000 1.15
+++ all/lib/Lire/Report/Subreport.pm 16 Feb 2003 17:45:38 -0000
@@ -115,6 +115,8 @@
bless { superservice => $report->superservice,
type => $type,
missing => 1,
+ entries => [],
+ report => $report,
reason => $reason,
}, $class;
}
@@ -190,6 +192,7 @@
}
$_[0]{charttype};
}
+
=pod
=head2 hostname([$hostname])
@@ -436,7 +439,11 @@
sub delete {
my ( $self ) = @_;
- $self->SUPER::delete;
+ $self->{table_info}->delete
+ if $self->{table_info};
+ foreach my $e ( $self->entries ) {
+ $e->delete;
+ }
delete $self->{report};
}
=== Exit status: 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.logreport.org/pipermail/questions/attachments/20030216/000614c7/attachment.bin
More information about the Questions
mailing list