Tue Jul 28 08:16:06 PDT 2009
- Previous message: [Slony1-hackers] Option to specify log file name for Slony
- Next message: [Slony1-hackers] Option to specify log file name for Slony
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Devrim GÜNDÜZ <devrim at gunduz.org> writes: > I was trying to figure out a way to control log filename for Slony, and > I found related code piece in slon_tools.pm : > > ============================ > my $cmd = "@@SLONBINDIR@@/slon -s $SYNC_CHECK_INTERVAL -d$DEBUGLEVEL $CLUSTER_NAME '$dsn' "; > if ($APACHE_ROTATOR) { > $cmd .= "2>&1 | $APACHE_ROTATOR \"$LOGDIR/slony1/node$nodenum/" . $dbname . "_%Y-%m-%d_%H:%M:%S.log\" 10M &"; > } else { > my $now=`date '+%Y-%m-%d_%H:%M:%S'`; > chomp $now; > $cmd .= "> $LOGDIR/slony1/node$nodenum/$dbname-$now.log 2>&1 &"; > ============================ > > So, instead of using hardcoded log file suffix, I was thinking of adding > an option in slon_tools.conf for log filename: > > LOG_NAME_SUFFIX = '%a' > > and use it in slon_tools.pm file. > > A patch is attached. I'm not a perl guy, so the patch might look like an > idiot -- but it will give an idea of what I'm proposing. This looks pretty reasonable to me... What I'd *rather* recommend is that you use syslog, because that takes management of log files outside the responsibility of Slony-I altogether, but your addition seems apropos as an "altperl/slon_tools.pm" way. -- (format nil "~S@~S" "cbbrowne" "ca.afilias.info") <http://dba2.int.libertyrms.com/> Christopher Browne (416) 673-4124 (land) "Bother," said Pooh, "Eeyore, ready two photon torpedoes and lock phasers on the Heffalump, Piglet, meet me in transporter room three"
- Previous message: [Slony1-hackers] Option to specify log file name for Slony
- Next message: [Slony1-hackers] Option to specify log file name for Slony
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-hackers mailing list