From bdf8ef6925de6ea1a9330fa1ce32e1a315d07eb2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 5 Aug 2004 23:32:13 +0000 Subject: Create a built-in log rotation program, so that we no longer have to recommend that people go get Apache's rotatelogs program. Additional benefits are that configuration is done through GUC, rather than externally, and that the postmaster can monitor the log rotator and restart it after failure (though we certainly hope that won't happen often). Andreas Pflug, some rework by Tom Lane. --- src/include/postmaster/syslogger.h | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/include/postmaster/syslogger.h (limited to 'src/include/postmaster/syslogger.h') diff --git a/src/include/postmaster/syslogger.h b/src/include/postmaster/syslogger.h new file mode 100644 index 00000000000..a0f775c9a21 --- /dev/null +++ b/src/include/postmaster/syslogger.h @@ -0,0 +1,39 @@ +/*------------------------------------------------------------------------- + * + * syslogger.h + * Exports from postmaster/syslogger.c. + * + * Copyright (c) 2004, PostgreSQL Global Development Group + * + * $PostgreSQL: pgsql/src/include/postmaster/syslogger.h,v 1.1 2004/08/05 23:32:12 tgl Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef _SYSLOGGER_H +#define _SYSLOGGER_H + +/* GUC options */ +extern bool Redirect_stderr; +extern int Log_RotationAge; +extern int Log_RotationSize; +extern char *Log_directory; +extern char *Log_filename_prefix; + +extern bool am_syslogger; + +#ifndef WIN32 +extern int syslogPipe[2]; +#else +extern HANDLE syslogPipe[2]; +#endif + + +extern int SysLogger_Start(void); + +extern void write_syslogger_file(const char *buffer, int count); + +#ifdef EXEC_BACKEND +extern void SysLoggerMain(int argc, char *argv[]); +#endif + +#endif /* _SYSLOGGER_H */ -- cgit v1.2.3