Skip to content

Commit

Permalink
* perl/Amanda/Report.pm: fixed order that messages are reported NOTEST
Browse files Browse the repository at this point in the history
git-svn-id: https://amanda.svn.sourceforge.net/svnroot/amanda/amanda/trunk@2659 a8d146d6-cc15-0410-8900-af154a0219e0
  • Loading branch information
Paul Mantz committed Mar 11, 2010
1 parent 5566744 commit deb1d40
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2010-03-11 Paul C. Mantz <pcmantz@zmanda.com>
* perl/Amanda/Report.pm: fixed order that messages are reported

2010-03-10 Dustin J. Mitchell <dustin@zmanda.com>
* perl/Amanda/Changer/null.pm: note that constructor will not fail
* server-src/amidxtaped.pl: use chg-null if the changer constructor
Expand Down
29 changes: 16 additions & 13 deletions perl/Amanda/Report/human.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ use constant COLSPEC_MAXWIDTH => 4; # resize if set
use constant COLSPEC_FORMAT => 5; # sprintf format
use constant COLSPEC_TITLE => 6; # column title

use constant PROGRAM_ORDER =>
qw(amdump planner amflush driver dumper chunker taper reporter);


## helper functions

sub divzero
Expand Down Expand Up @@ -168,17 +172,16 @@ sub new

@errors =
map { @{ $report->get_program_info($_, "errors", []) }; }
keys %{ $report->{data}{programs} };
PROGRAM_ORDER;
## prepend program name to notes lines.
foreach my $program (keys %{ $report->{data}{programs} }) {
foreach my $program (PROGRAM_ORDER) {
push @notes,
map { "$program: $_" }
@{ $report->get_program_info($program, "notes", []) };
}

$self->{errors} = \@errors;
$self->{notes} = \@notes;

$self->{errors} = \@errors;
$self->{notes} = \@notes;
}

bless $self, $class;
Expand Down Expand Up @@ -493,14 +496,14 @@ sub output_error_summaries
my @dump_failures = ();
my @stranges = ();

foreach my $program (keys %{ $report->{data}{programs} }) {
push @fatal_failures,
map { "$program: FATAL $_" }
@{ $report->get_program_info($program, "fatal", []) };
push @error_failures,
map { "$program: ERROR $_" }
@{ $report->get_program_info($program, "errors", []) };
foreach my $program (PROGRAM_ORDER) {

push @fatal_failures,
map { "$program: FATAL $_" }
@{ $report->get_program_info($program, "fatal", []) };
push @error_failures,
map { "$program: ERROR $_" }
@{ $report->get_program_info($program, "errors", []) };
}

foreach my $dle_entry (@dles) {
Expand Down

0 comments on commit deb1d40

Please sign in to comment.