Hi!
I just tried out your new apache and it works fine!
Nevertheless I want to contribute this little patch
which enables to configure a logfile extension, i.e.
for each month or day or ...
Example: (What I am using)
httpd.conf: TransferLogExt -%y%m%d
This makes a logfile named "access_log-950411", each for one day ...
I hope you`ll find it useful and add it to the next release!
--
Ciao, Achim
-------------------------------------------------------------------
Achim Jung IRC: Flops junga@informatik.tu-muenchen.de
http://www.tu-muenchen.de/~junga/ flops@leo.org
*** http_config.c Tue Apr 11 08:07:07 1995
--- http_config.c.orig Sun Apr 2 16:39:35 1995
***************
*** 25,31 ****
char server_confname[MAX_STRING_LEN];
char access_confname[MAX_STRING_LEN];
char types_confname[MAX_STRING_LEN];
- char xfer_ext[MAX_STRING_LEN];
/* Apache keeps a list of pointer to custom responses */
char *response_code_strings[RESPONSE_CODES+1];
int timeout;
--- 25,30 ----
***************
*** 54,60 ****
make_full_path(server_root,DEFAULT_XFERLOG,xfer_fname);
make_full_path(server_root,DEFAULT_PIDLOG,pid_fname);
strcpy(server_admin,DEFAULT_ADMIN);
- strcpy(xfer_ext,"");
server_hostname = NULL;
make_full_path(server_root,RESOURCE_CONFIG_FILE,srm_confname);
/* server_confname set in httpd.c */
--- 53,58 ----
***************
*** 138,151 ****
else
strcpy(error_fname,w);
}
- else if(!strcasecmp(w,"TransferLogExt")) {
- cfg_getword(w,l);
- if(w[0] != '\0') {
- time_t t;
- t = time(NULL);
- strftime(xfer_ext, MAX_STRING_LEN, w, localtime(&t));
- }
- }
else if(!strcasecmp(w,"TransferLog")) {
cfg_getword(w,l);
if(w[0] != '/')
--- 136,141 ----
***************
*** 226,238 ****
}
}
}
-
- /*
- * cannot do it earlier or I would have to do it more than
- * once in TransferLog and TransferLogExt
- */
- strncat(xfer_fname, xfer_ext, MAX_STRING_LEN);
-
fclose(cfg);
}
--- 216,221 ----
I just tried out your new apache and it works fine!
Nevertheless I want to contribute this little patch
which enables to configure a logfile extension, i.e.
for each month or day or ...
Example: (What I am using)
httpd.conf: TransferLogExt -%y%m%d
This makes a logfile named "access_log-950411", each for one day ...
I hope you`ll find it useful and add it to the next release!
--
Ciao, Achim
-------------------------------------------------------------------
Achim Jung IRC: Flops junga@informatik.tu-muenchen.de
http://www.tu-muenchen.de/~junga/ flops@leo.org
*** http_config.c Tue Apr 11 08:07:07 1995
--- http_config.c.orig Sun Apr 2 16:39:35 1995
***************
*** 25,31 ****
char server_confname[MAX_STRING_LEN];
char access_confname[MAX_STRING_LEN];
char types_confname[MAX_STRING_LEN];
- char xfer_ext[MAX_STRING_LEN];
/* Apache keeps a list of pointer to custom responses */
char *response_code_strings[RESPONSE_CODES+1];
int timeout;
--- 25,30 ----
***************
*** 54,60 ****
make_full_path(server_root,DEFAULT_XFERLOG,xfer_fname);
make_full_path(server_root,DEFAULT_PIDLOG,pid_fname);
strcpy(server_admin,DEFAULT_ADMIN);
- strcpy(xfer_ext,"");
server_hostname = NULL;
make_full_path(server_root,RESOURCE_CONFIG_FILE,srm_confname);
/* server_confname set in httpd.c */
--- 53,58 ----
***************
*** 138,151 ****
else
strcpy(error_fname,w);
}
- else if(!strcasecmp(w,"TransferLogExt")) {
- cfg_getword(w,l);
- if(w[0] != '\0') {
- time_t t;
- t = time(NULL);
- strftime(xfer_ext, MAX_STRING_LEN, w, localtime(&t));
- }
- }
else if(!strcasecmp(w,"TransferLog")) {
cfg_getword(w,l);
if(w[0] != '/')
--- 136,141 ----
***************
*** 226,238 ****
}
}
}
-
- /*
- * cannot do it earlier or I would have to do it more than
- * once in TransferLog and TransferLogExt
- */
- strncat(xfer_fname, xfer_ext, MAX_STRING_LEN);
-
fclose(cfg);
}
--- 216,221 ----