You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2007/11/26 17:35:46 UTC
svn commit: r598338 - in /tomcat/connectors/trunk/jk:
native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c
xdocs/miscellaneous/changelog.xml
Author: rjung
Date: Mon Nov 26 08:35:46 2007
New Revision: 598338
URL: http://svn.apache.org/viewvc?rev=598338&view=rev
Log:
Apache: Create JK_WORKER_ROUTE and JK_REQUEST_DURATION notes for
access log even if no JkRequestLogFormat is set.
Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?rev=598338&r1=598337&r2=598338&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Mon Nov 26 08:35:46 2007
@@ -2158,6 +2158,8 @@
if (worker) {
#ifndef NO_GETTIMEOFDAY
struct timeval tv_begin, tv_end;
+ long micro, seconds;
+ char *duration = NULL;
#endif
int rc = JK_FALSE;
int is_error = JK_HTTP_SERVER_ERROR;
@@ -2207,23 +2209,21 @@
}
}
}
- if (conf->format != NULL) {
#ifndef NO_GETTIMEOFDAY
- long micro, seconds;
- char *duration = NULL;
- gettimeofday(&tv_end, NULL);
- if (tv_end.tv_usec < tv_begin.tv_usec) {
- tv_end.tv_usec += 1000000;
- tv_end.tv_sec--;
- }
- micro = tv_end.tv_usec - tv_begin.tv_usec;
- seconds = tv_end.tv_sec - tv_begin.tv_sec;
- duration =
- ap_psprintf(r->pool, "%.1ld.%.6ld", seconds, micro);
- ap_table_setn(r->notes, JK_NOTE_REQUEST_DURATION, duration);
+ gettimeofday(&tv_end, NULL);
+ if (tv_end.tv_usec < tv_begin.tv_usec) {
+ tv_end.tv_usec += 1000000;
+ tv_end.tv_sec--;
+ }
+ micro = tv_end.tv_usec - tv_begin.tv_usec;
+ seconds = tv_end.tv_sec - tv_begin.tv_sec;
+ duration =
+ ap_psprintf(r->pool, "%.1ld.%.6ld", seconds, micro);
+ ap_table_setn(r->notes, JK_NOTE_REQUEST_DURATION, duration);
#endif
- if (s.route && *s.route)
- ap_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.route);
+ if (s.route && *s.route)
+ ap_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.route);
+ if (conf->format != NULL) {
request_log_transaction(r, conf);
}
}
Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=598338&r1=598337&r2=598338&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Mon Nov 26 08:35:46 2007
@@ -2243,6 +2243,9 @@
}
if (worker) {
+ long micro, seconds;
+ char *duration = NULL;
+ apr_time_t rd;
apr_time_t request_begin = 0;
int is_error = HTTP_INTERNAL_SERVER_ERROR;
int rc = JK_FALSE;
@@ -2315,18 +2318,16 @@
JK_TRACE_EXIT(xconf->log);
return HTTP_INTERNAL_SERVER_ERROR;
}
- if (xconf->format != NULL) {
- long micro, seconds;
- char *duration = NULL;
- apr_time_t rd = apr_time_now() - request_begin;
- seconds = (long)apr_time_sec(rd);
- micro = (long)(rd - apr_time_from_sec(seconds));
-
- duration = apr_psprintf(r->pool, "%.1ld.%.6ld", seconds, micro);
- apr_table_setn(r->notes, JK_NOTE_REQUEST_DURATION, duration);
- if (s.route && *s.route)
- apr_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.route);
+ rd = apr_time_now() - request_begin;
+ seconds = (long)apr_time_sec(rd);
+ micro = (long)(rd - apr_time_from_sec(seconds));
+
+ duration = apr_psprintf(r->pool, "%.1ld.%.6ld", seconds, micro);
+ apr_table_setn(r->notes, JK_NOTE_REQUEST_DURATION, duration);
+ if (s.route && *s.route)
+ apr_table_setn(r->notes, JK_NOTE_WORKER_ROUTE, s.route);
+ if (xconf->format != NULL) {
request_log_transaction(r, xconf);
}
Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=598338&r1=598337&r2=598338&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Mon Nov 26 08:35:46 2007
@@ -44,6 +44,10 @@
<subsection name="Native">
<changelog>
<update>
+ Apache: Create JK_WORKER_ROUTE and JK_REQUEST_DURATION notes for
+ access log even if no JkRequestLogFormat is set. (rjung)
+ </update>
+ <update>
JKStatus: Enhance URI to worker map listing for Apache httpd.
We now list maps for all virtual servers and not only
the one, in which JKStatus itself was called. (rjung)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org