summaryrefslogtreecommitdiff
path: root/sysdep/unix/unix.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-11-14 17:16:05 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-11-18 14:03:50 +0100
commit6712e77271fb3cb4a3c48cd7b027b39c5cea00a2 (patch)
tree9fd54c0a94001e27cc4dfe65f78dc4474126ea3f /sysdep/unix/unix.h
parentc68ba7d093e1fcf01fceb341438fc5dc95f93ac5 (diff)
Unix: Implement log file size limit / log rotation
Allow to specify log file size limit and ensure that log file is rotated to secondary name to avoid exceeding of log size limit. The patch also fixes a bug related to keeping old fds open after reconfiguration and using old fds after 'configure undo'.
Diffstat (limited to 'sysdep/unix/unix.h')
-rw-r--r--sysdep/unix/unix.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdep/unix/unix.h b/sysdep/unix/unix.h
index 64b146ee..12306167 100644
--- a/sysdep/unix/unix.h
+++ b/sysdep/unix/unix.h
@@ -122,6 +122,11 @@ struct log_config {
node n;
uint mask; /* Classes to log */
void *fh; /* FILE to log to, NULL=syslog */
+ struct rfile *rf; /* Resource for log file */
+ char *filename; /* Log filename */
+ char *backup; /* Secondary filename (for log rotation) */
+ off_t pos; /* Position/size of current log */
+ off_t limit; /* Log size limit */
int terminal_flag;
};