--- build-tree/apache2/modules/loggers/mod_logio.c 2006-07-12 03:38:44.000000000 +0000 +++ build-tree/apache2/modules/loggers/mod_logio.c 2007-05-07 18:08:02.000000000 +0000 @@ -23,6 +23,8 @@ * * %...I: bytes received, including request and headers, cannot be zero * %...O: bytes sent, including headers, cannot be zero + * %...S: sum of bytes sent and received, including request and headers, + * cannot be zero * */ @@ -53,6 +55,7 @@ typedef struct logio_config_t { apr_off_t bytes_in; apr_off_t bytes_out; + apr_off_t bytes_sum; } logio_config_t; /* @@ -85,6 +88,14 @@ return apr_off_t_toa(r->pool, cf->bytes_out); } +static const char *log_bytes_sum(request_rec *r, char *a) +{ + logio_config_t *cf = ap_get_module_config(r->connection->conn_config, + &logio_module); + + return apr_off_t_toa(r->pool, (cf->bytes_in+cf->bytes_out)); +} + /* * Reset counters after logging... */ @@ -94,7 +105,7 @@ logio_config_t *cf = ap_get_module_config(r->connection->conn_config, &logio_module); - cf->bytes_in = cf->bytes_out = 0; + cf->bytes_in = cf->bytes_out = cf->bytes_sum = 0; return OK; } @@ -159,6 +170,7 @@ if (log_pfn_register) { log_pfn_register(p, "I", log_bytes_in, 0); log_pfn_register(p, "O", log_bytes_out, 0); + log_pfn_register(p, "S", log_bytes_sum, 0); } return OK;