Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix LOG_NAME_SUFFIX feature. Thanks to David Fetter and Andrew Dunstan.

  • Loading branch information...
commit 4c27d7262f55d209f5d022d23f449749d9986d9d 1 parent 5d53ff3
@devrimgunduz devrimgunduz authored
View
7 tools/altperl/slon-tools.pm
@@ -1,8 +1,10 @@
# -*- perl -*-
-# $Id: slon-tools.pm,v 1.32.2.4 2009-07-28 15:23:33 cbbrowne Exp $
+# $Id: slon-tools.pm,v 1.32.2.5 2009-08-12 20:52:20 devrim Exp $
# Author: Christopher Browne
# Copyright 2004 Afilias Canada
+use POSIX;
+
sub add_node {
my %PARAMS = (host=> undef,
dbname => 'template1',
@@ -133,9 +135,10 @@ sub start_slon {
my ($dsn, $dbname) = ($DSN[$nodenum], $DBNAME[$nodenum]);
$SYNC_CHECK_INTERVAL ||= 1000;
$DEBUGLEVEL ||= 0;
+ $LOG_NAME_SUFFIX ||= '%Y-%m-%d';
system("mkdir -p $LOGDIR/slony1/node$nodenum");
my $cmd = "@@SLONBINDIR@@/slon -s $SYNC_CHECK_INTERVAL -d$DEBUGLEVEL $CLUSTER_NAME '$dsn' ";
- my $logfilesuffix=`date '$LOG_NAME_SUFFIX'`;
+ my $logfilesuffix = POSIX::strftime( "$LOG_NAME_SUFFIX",localtime );
chomp $logfilesuffix;
if ($APACHE_ROTATOR) {
View
4 tools/altperl/slon_tools.conf-sample
@@ -1,4 +1,4 @@
-# $Id: slon_tools.conf-sample,v 1.8.2.1 2009-07-28 15:23:33 cbbrowne Exp $
+# $Id: slon_tools.conf-sample,v 1.8.2.2 2009-08-12 20:52:20 devrim Exp $
# Author: Christopher Browne
# Copyright 2004 Afilias Canada
# Revised extensively by Steve Simms
@@ -34,7 +34,7 @@ if ($ENV{"SLONYNODES"}) {
# Log line suffix for Slony-I log. For options, look at date(1)
# man page.
#
- # LOG_NAME_SUFFIX = '%a'
+ # LOG_NAME_SUFFIX = '%a';
# SYNC check interval (slon -s option)
# $SYNC_CHECK_INTERVAL = 1000;
Please sign in to comment.
Something went wrong with that request. Please try again.