summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sabino Mullane2012-02-20 20:27:32 +0000
committerGreg Sabino Mullane2012-02-20 20:27:32 +0000
commit05ced1151488666c37f04ec55ac308ef56b93dae (patch)
tree336e663cd0c2f0f31eaac460da5f84ed0349bc88
parent0f18b18e09a3160ac89ed2d1a2af00fe5f1ba148 (diff)
Cleaner "ERROR" output
-rwxr-xr-xcheck_postgres.pl4
1 files changed, 4 insertions, 0 deletions
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;
}