You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/05/09 01:54:33 UTC
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_env.c jk_handler_response.c
costin 02/05/08 16:54:33
Modified: jk/native2/common jk_env.c jk_handler_response.c
Log:
Init debug, disabled.
Use the 'debug' attribute of the uri to decide if we display information
about the mappings.
The problem is that with 'global' debug enabled we get too much info,
and that makes it hard to debug.
Using a 'log4j' aproach with a config file for all loggers is too complex.
We just have a 'debug' attribute for each component, and use it to filter.
A debug on a uri will display info about requests that are mapped to that
particular uri.
Debug on worker ( and lb worker ) will display specific info when that
worker is used.
Revision Changes Path
1.22 +2 -0 jakarta-tomcat-connectors/jk/native2/common/jk_env.c
Index: jk_env.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_env.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- jk_env.c 3 May 2002 17:41:06 -0000 1.21
+++ jk_env.c 8 May 2002 23:54:32 -0000 1.22
@@ -247,6 +247,8 @@
result->type= workerPool->pstrdup( env, workerPool, type);
result->name= workerPool->pstrdup( env, workerPool, name);
result->localName=workerPool->pstrdup( env, workerPool, localName);
+ result->debug=0;
+ result->disabled=JK_FALSE;
result->settings=NULL;
result->getAttributeInfo=NULL;
result->setAttributeInfo=NULL;
1.17 +13 -6 jakarta-tomcat-connectors/jk/native2/common/jk_handler_response.c
Index: jk_handler_response.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_handler_response.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- jk_handler_response.c 25 Apr 2002 19:14:31 -0000 1.16
+++ jk_handler_response.c 8 May 2002 23:54:32 -0000 1.17
@@ -99,7 +99,11 @@
int i;
jk_pool_t * pool = s->pool;
int headerCount;
+ int debug=1;
+ if( s->uriEnv != NULL )
+ debug=s->uriEnv->debug;
+
s->status = msg->getInt(env, msg);
s->msg = (char *)msg->getString(env, msg);
if (s->msg) {
@@ -147,9 +151,10 @@
jk_xlate_from_ascii(valueS, strlen(valueS));
- env->l->jkLog(env, env->l, JK_LOG_INFO,
- "handler.response() Header[%d] [%s] = [%s]\n",
- i, nameS, valueS);
+ if(debug > 0 )
+ env->l->jkLog(env, env->l, JK_LOG_INFO,
+ "handler.response() Header[%d] [%s] = [%s]\n",
+ i, nameS, valueS);
/* Do we want this ? Preserve the headers, maybe someone will
need them. Alternative is to use a different buffer every time,
@@ -161,10 +166,12 @@
s->headers_out->add( env, s->headers_out, nameS, valueS );
}
+
- env->l->jkLog(env, env->l, JK_LOG_INFO,
- "handler.response(): status=%d headers=%d\n",
- s->status, headerCount);
+ if(debug > 0 )
+ env->l->jkLog(env, env->l, JK_LOG_INFO,
+ "handler.response(): status=%d headers=%d\n",
+ s->status, headerCount);
err=s->head(env, s);
if( err!=JK_OK ) {
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>