summaryrefslogtreecommitdiff
path: root/src/include/postmaster/syslogger.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-08-05 23:32:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-08-05 23:32:13 +0000
commitbdf8ef6925de6ea1a9330fa1ce32e1a315d07eb2 (patch)
tree80d8dd5dd82a93e69e3e0133ffdca0a7c03ea893 /src/include/postmaster/syslogger.h
parentb4cd416ab0003483cbf5467974ead4732357b17d (diff)
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.
Diffstat (limited to 'src/include/postmaster/syslogger.h')
-rw-r--r--src/include/postmaster/syslogger.h39
1 files changed, 39 insertions, 0 deletions
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 */