Hi,
Glad to hear you like the idea.
May I also suggest my favourite patch for rotatelogs
(enclosed). It creates a "hard link" to the latest log using
the base logfilename. i.e:
-rw-r--r-- 1 root wheel 8901 May 19 04:45
localhost-access.log.0958694400
-rw-r--r-- 2 root wheel 18430 May 21 17:05
localhost-access.log.0958867200
-rw-r--r-- 2 root wheel 18430 May 21 17:05 localhost-access.log
This is very nice when developing and debugging, since you
don't need to check for the latest log's filename, but can just
issue "tail -f localhost-access.log". FreeBSD'er can enjoy tail
-F, which will follow the log even after a rotation...
The function should probably be optional?
Cheers,
Palle
"Roderick A. Anderson" wrote:
>
> On Mon, 22 May 2000, Peter Eisentraut wrote:
>
> > Now there's a good idea. Why don't we abduct that program and teach pg_ctl
> > about it. (After all, we abducted that one as well. :)
>
> Imitation is the sincerest form of flattery. Not to mention this is the
> bazar.
>
> Rod
> --
> Roderick A. Anderson
> raanders@altoplanos.net Altoplanos Information Systems, Inc.
> Voice: 208.765.6149 212 S. 11th Street, Suite 5
> FAX: 208.664.5299 Coeur d'Alene, ID 83814
--
Palle--- src/support/rotatelogs.c~ Mon Aug 3 11:15:33 1998
+++ src/support/rotatelogs.c Sun Mar 26 22:42:40 2000
@@ -14,6 +14,7 @@
#include <time.h>
#include <errno.h>
#include <fcntl.h>
+#include <unistd.h>
int main (int argc, char **argv)
{
@@ -73,6 +74,8 @@
perror(buf2);
exit(2);
}
+ unlink(szLogRoot);
+ link(buf2, szLogRoot);
}
if (write(nLogFD, buf, nRead) != nRead) {
perror(buf2);