You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/08/22 19:13:24 UTC
[PATCH] from uunet: don't log anything if no TransferLog
[I received a bunch of patches from UUnet which they apply to every
release. I busted them apart into smaller pieces, but haven't tested any
of them. Consider this to be a +1 for inclusion in 1.3. I'm hoping
someone else will redo these as patches against 1.3.]
FWIW, I had to do a similar patch for hotwired who also uses a customized
logging module. This does mean people will need to look at their config
files on update ...
Dean
Thu Aug 14 12:01:28 1997 David J. MacKenzie <dj...@va.pubnix.com>
* mod_log_config.c: If no TransferLog is given explicitly, decline
to log. This supports coexistence with other logging modules,
such as the custom one that UUNET uses.
Index: src/mod_log_config.c
--- mod_log_config.c 1997/07/08 21:08:31 1.1
+++ mod_log_config.c 1997/07/08 21:22:47 1.2
@@ -51,6 +51,9 @@
*/
/*
+ * Modified by djm@va.pubnix.com:
+ * If no TransferLog is given explicitly, decline to log.
+ *
* This is module implements the TransferLog directive (same as the
* common log module), and additional directives, LogFormat and CustomLog.
*
@@ -532,6 +535,10 @@
int len = 0;
array_header *format;
+ if (cls->fname == NULL) {
+ return DECLINED;
+ }
+
format = cls->format ? cls->format : default_format;
strsa= make_array(r->pool, format->nelts,sizeof(char*));
@@ -698,6 +705,10 @@
array_header *default_format) {
if (cls->log_fd > 0) return cls; /* virtual config shared w/main server */
+ if (cls->fname == NULL) {
+ return cls; /* Leave it NULL to decline. */
+ }
+
if (*cls->fname == '|') {
FILE *dummy;