projects
/
check_postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f18b18
)
Cleaner "ERROR" output
author
Greg Sabino Mullane
<
[email protected]
>
Mon, 20 Feb 2012 20:27:32 +0000
(15:27 -0500)
committer
Greg Sabino Mullane
<
[email protected]
>
Mon, 20 Feb 2012 20:27:32 +0000
(15:27 -0500)
check_postgres.pl
patch
|
blob
|
blame
|
history
diff --git
a/check_postgres.pl
b/check_postgres.pl
index 9a0746214de062f623b4f8833b2a60cddd65c30f..4fc3c00053f27de0ba889627559e2f4d77d2ccf4 100755
(executable)
--- 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;
}