]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add configure option to set MaxLogSize 35/head
authorDidier Raboud <odyx@debian.org>
Tue, 9 Aug 2016 16:11:40 +0000 (18:11 +0200)
committerDidier Raboud <odyx@debian.org>
Fri, 13 Nov 2020 16:04:55 +0000 (17:04 +0100)
This allows distributions to turn off CUPS' internal logrotation by setting it to "0".

conf/cupsd.conf.in
config-scripts/cups-defaults.m4

index ab37ca68c7f823c5f703a3279dbdfe5b950dd73a..3aa5086b7a37da8a77f11f6a342f00885df8cedd 100644 (file)
@@ -8,6 +8,9 @@
 LogLevel @CUPS_LOG_LEVEL@
 @CUPS_PAGE_LOG_FORMAT@
 
+# Specifies the maximum size of the log files before they are rotated.  The value "0" disables log rotation.
+MaxLogSize @CUPS_MAX_LOG_SIZE@
+
 # Only listen for connections from the local machine.
 Listen localhost:@DEFAULT_IPP_PORT@
 @CUPS_LISTEN_DOMAINSOCKET@
index 517539e1f218c4950cf74e3f900d236e3d49423f..83dfe58512306ca7726a6e7007877f7ba354309a 100644 (file)
@@ -93,6 +93,13 @@ AC_ARG_WITH(log_file_perm, [  --with-log-file-perm    set default LogFilePerm va
 AC_SUBST(CUPS_LOG_FILE_PERM)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LOG_FILE_PERM, 0$CUPS_LOG_FILE_PERM)
 
+dnl Default MaxLogSize
+AC_ARG_WITH(max_log_size, [  --with-max-log-size     set default MaxLogSize value, default=1m],
+       CUPS_MAX_LOG_SIZE="$withval",
+       CUPS_MAX_LOG_SIZE="1m")
+AC_SUBST(CUPS_MAX_LOG_SIZE)
+AC_DEFINE_UNQUOTED(CUPS_DEFAULT_MAX_LOG_SIZE, "$CUPS_MAX_LOG_SIZE")
+
 dnl Default FatalErrors
 AC_ARG_WITH(fatal_errors, [  --with-fatal-errors     set default FatalErrors value, default=config],
        CUPS_FATAL_ERRORS="$withval",