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:
c80788a
)
Handle %y in logfilename template.
author
Greg Sabino Mullane
<
[email protected]
>
Fri, 15 Oct 2010 16:21:30 +0000
(12:21 -0400)
committer
Greg Sabino Mullane
<
[email protected]
>
Fri, 15 Oct 2010 16:21:30 +0000
(12:21 -0400)
check_postgres.pl
patch
|
blob
|
blame
|
history
diff --git
a/check_postgres.pl
b/check_postgres.pl
index 2b99cf6b281ad9f45b7a95cb4c842b3a36dcf3ad..8312545b722d2d1c65a71040c8a382d45eef2385 100755
(executable)
--- a/
check_postgres.pl
+++ b/
check_postgres.pl
@@
-4046,11
+4046,13
@@
ORDER BY name
## We need at least hour, day, month, year
my @t = localtime;
my ($H,$d,$m,$Y) = (sprintf ('%02d',$t[2]),sprintf('%02d',$t[3]),sprintf('%02d',$t[4]+1),$t[5]+1900);
+ my $y = substr($Y,2,4);
if ($logfile !~ $logfilere) {
ndie msg('logfile-bad',$logfile);
}
$logfile =~ s/%%/~~/g;
$logfile =~ s/%Y/$Y/g;
+ $logfile =~ s/%y/$y/g;
$logfile =~ s/%m/$m/g;
$logfile =~ s/%d/$d/g;
$logfile =~ s/%H/$H/g;