From: Greg Sabino Mullane Date: Mon, 20 Feb 2012 20:27:32 +0000 (-0500) Subject: Cleaner "ERROR" output X-Git-Tag: 2.20.0~42 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=05ced1151488666c37f04ec55ac308ef56b93dae;p=check_postgres.git Cleaner "ERROR" output --- diff --git a/check_postgres.pl b/check_postgres.pl index 9a0746214..4fc3c0005 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -1271,6 +1271,10 @@ sub ndie { eval { File::Temp::cleanup(); }; my $msg = shift; chomp $msg; + ## If this message already starts with an ERROR, filter that out for prettiness + $msg =~ s/^\s*ERROR:\s*/ /; + ## Trim whitespace + $msg =~ s/^\s*(.+)\s*$/$1/; print "ERROR: $msg\n"; exit 3; }