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 23:12:15 UTC
cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_channel_socket.c jk_env.c jk_handler_response.c jk_requtil.c jk_uriEnv.c jk_uriMap.c
costin 02/05/09 14:12:15
Modified: jk/native2/common jk_channel_socket.c jk_env.c
jk_handler_response.c jk_requtil.c jk_uriEnv.c
jk_uriMap.c
Log:
Filter more messages based on the debug level of the worker or uri.
Things are getting pretty stable ( except JNI and unix worker, where I still
get crashes from time to time - I suspect some signal problems ), I'll start
loading it up and the messages were too verbose.
Nacho, Henri - if you debug it please set debug=1 on the uri and worker objects.
Revision Changes Path
1.22 +4 -3 jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c
Index: jk_channel_socket.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- jk_channel_socket.c 3 May 2002 17:39:40 -0000 1.21
+++ jk_channel_socket.c 9 May 2002 21:12:15 -0000 1.22
@@ -466,9 +466,10 @@
return JK_ERR;
}
- env->l->jkLog(env, env->l, JK_LOG_INFO,
- "channelSocket.receive(): Received len=%d type=%d\n",
- blen, (int)msg->buf[hlen]);
+ if( ch->mbean->debug > 0 )
+ env->l->jkLog(env, env->l, JK_LOG_INFO,
+ "channelSocket.receive(): Received len=%d type=%d\n",
+ blen, (int)msg->buf[hlen]);
return JK_OK;
}
1.23 +1 -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.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- jk_env.c 8 May 2002 23:54:32 -0000 1.22
+++ jk_env.c 9 May 2002 21:12:15 -0000 1.23
@@ -248,6 +248,7 @@
result->name= workerPool->pstrdup( env, workerPool, name);
result->localName=workerPool->pstrdup( env, workerPool, localName);
result->debug=0;
+ result->state=JK_STATE_NEW;
result->disabled=JK_FALSE;
result->settings=NULL;
result->getAttributeInfo=NULL;
1.18 +1 -1 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.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- jk_handler_response.c 8 May 2002 23:54:32 -0000 1.17
+++ jk_handler_response.c 9 May 2002 21:12:15 -0000 1.18
@@ -102,7 +102,7 @@
int debug=1;
if( s->uriEnv != NULL )
- debug=s->uriEnv->debug;
+ debug=s->uriEnv->mbean->debug;
s->status = msg->getInt(env, msg);
s->msg = (char *)msg->getString(env, msg);
1.15 +1 -1 jakarta-tomcat-connectors/jk/native2/common/jk_requtil.c
Index: jk_requtil.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_requtil.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- jk_requtil.c 3 May 2002 22:12:17 -0000 1.14
+++ jk_requtil.c 9 May 2002 21:12:15 -0000 1.15
@@ -532,7 +532,7 @@
int debug=0;
if( s->uriEnv != NULL ) {
- debug=s->uriEnv->debug;
+ debug=s->uriEnv->mbean->debug;
}
rc=jk2_requtil_getMethodId(env, s->method, &method);
1.17 +10 -14 jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c
Index: jk_uriEnv.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- jk_uriEnv.c 7 May 2002 19:42:40 -0000 1.16
+++ jk_uriEnv.c 9 May 2002 21:12:15 -0000 1.17
@@ -166,11 +166,8 @@
}
uriEnv->aliases->put( env, uriEnv->aliases, val, uriEnv, NULL );
}
- } else if( strcmp("debug", name) == 0 ) {
- uriEnv->debug=atoi( val );
- return JK_OK;
- }
-
+ }
+
/* OLD - DEPRECATED */
if( strcmp("worker", name) == 0 ) {
uriEnv->workerName=val;
@@ -210,7 +207,7 @@
uriEnv->workerName=uriEnv->uriMap->workerEnv->defaultWorker->mbean->name;;
uriEnv->worker=uriEnv->uriMap->workerEnv->defaultWorker;
- if( uriEnv->debug > 0 )
+ if( uriEnv->mbean->debug > 0 )
env->l->jkLog(env, env->l, JK_LOG_DEBUG,
"uriEnv.init() map %s %s\n",
uriEnv->uri, uriEnv->uriMap->workerEnv->defaultWorker->mbean->name);
@@ -260,7 +257,7 @@
/* Context and host maps do not have ASTERISK */
uriEnv->match_type = MATCH_TYPE_EXACT;
}
- if( uriEnv->debug > 0 ) {
+ if( uriEnv->mbean->debug > 0 ) {
if( uriEnv->match_type == MATCH_TYPE_CONTEXT ) {
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriEnv.init() context mapping %s=%s \n",
@@ -298,7 +295,7 @@
uriEnv->prefix_len =strlen( uriEnv->prefix );
uriEnv->match_type = MATCH_TYPE_CONTEXT_PATH;
- if( uriEnv->debug > 0 ) {
+ if( uriEnv->mbean->debug > 0 ) {
env->l->jkLog(env, env->l, JK_LOG_INFO,
"Into jk_uri_worker_map_t::uri_worker_map_open, "
"general context path rule %s * %s -> %s was added\n",
@@ -312,7 +309,7 @@
uriEnv->prefix_len =strlen( uriEnv->prefix );
uriEnv->suffix = asterisk + 3;
uriEnv->match_type = MATCH_TYPE_SUFFIX;
- if( uriEnv->debug > 0 ) {
+ if( uriEnv->mbean->debug > 0 ) {
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriEnv.init() suffix mapping %s .%s=%s was added\n",
uriEnv->prefix, uriEnv->suffix, uriEnv->workerName);
@@ -324,7 +321,7 @@
uriEnv->prefix = uri;
uriEnv->prefix_len =strlen( uriEnv->prefix );
uriEnv->match_type = MATCH_TYPE_GENERAL_SUFFIX;
- if( uriEnv->debug > 0 ) {
+ if( uriEnv->mbean->debug > 0 ) {
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriEnv.init() general suffix mapping %s.%s=%s\n",
uri, asterisk + 2, uriEnv->workerName);
@@ -337,7 +334,7 @@
uriEnv->prefix = uri;
uriEnv->prefix_len =strlen( uriEnv->prefix );
uriEnv->match_type = MATCH_TYPE_PREFIX;
- if( uriEnv->debug > 0 ) {
+ if( uriEnv->mbean->debug > 0 ) {
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriEnv.init() prefix mapping %s=%s\n",
uriEnv->prefix, uriEnv->workerName);
@@ -350,13 +347,13 @@
uriEnv->prefix_len =strlen( uriEnv->prefix );
uriEnv->suffix = NULL;
uriEnv->match_type = MATCH_TYPE_PREFIX;
- if( uriEnv->debug > 0 ) {
+ if( uriEnv->mbean->debug > 0 ) {
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriEnv.init() prefix mapping2 %s=%s\n",
uri, uriEnv->workerName);
}
}
- if( uriEnv->debug > 0 )
+ if( uriEnv->mbean->debug > 0 )
env->l->jkLog( env, env->l, JK_LOG_INFO,
"uriEnv.init() %s host=%s uri=%s type=%d ctx=%s prefix=%s suffix=%s\n",
uriEnv->mbean->name, uriEnv->virtual, uriEnv->uri,
@@ -384,7 +381,6 @@
jk2_map_default_create( env, &uriEnv->properties, uriPool );
- uriEnv->debug=0;
uriEnv->init=jk2_uriEnv_init;
result->setAttribute=jk2_uriEnv_setAttribute;
1.32 +22 -25 jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c
Index: jk_uriMap.c
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- jk_uriMap.c 7 May 2002 19:42:40 -0000 1.31
+++ jk_uriMap.c 9 May 2002 21:12:15 -0000 1.32
@@ -145,7 +145,7 @@
int rc;
uriMap->maps->put( env, uriMap->maps, uriEnv->name, uriEnv, NULL );
- if( uriMap->debug > 0 )
+ if( uriMap->mbean->debug > 0 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.addUriEnv() %s %s %s\n", uriEnv->name, uriEnv->virtual, uriEnv->uri);
return JK_OK;
@@ -157,10 +157,6 @@
jk_uriMap_t *uriMap=mbean->object;
char *value=valueP;
- if( strcmp( name, "debug" )==0 ) {
- uriMap->debug=atoi( value );
- return JK_OK;
- }
return JK_OK;
}
@@ -216,7 +212,7 @@
#else
if(0 == strcmp(suffix, uwr->suffix)) {
#endif
- if( uriMap->debug > 0 ) {
+ if( uriMap->mbean->debug > 0 ) {
env->l->jkLog(env, env->l,JK_LOG_INFO,
"uriMap.mapUri() suffix match %s\n",
uwr->suffix );
@@ -344,7 +340,7 @@
}
uriMap->defaultVhost=mbean->object;
- if( uriMap->debug > 5 )
+ if( uriMap->mbean->debug > 5 )
env->l->jkLog(env, env->l, JK_LOG_INFO, "uriMap.init() set default host\n");
/* Initialize the vhosts table */
@@ -358,7 +354,7 @@
uriMap->vhosts->put( env, uriMap->vhosts,
uriEnv->virtual, uriEnv, NULL );
}
- if( uriMap->debug > 5 )
+ if( uriMap->mbean->debug > 5 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.init() loaded host %s\n",uriEnv->virtual);
}
@@ -398,8 +394,9 @@
if( rootCtx==NULL ) {
env->createBean2( env, uriMap->mbean->pool, "uri", uriPath );
rootCtx=env->getByName2( env, "uri", uriPath );
- env->l->jkLog(env, env->l, JK_LOG_INFO,
- "uriMap.init() Create default context %s\n", uriPath );
+ if( uriMap->mbean->debug > 0 )
+ env->l->jkLog(env, env->l, JK_LOG_INFO,
+ "uriMap.init() Create default context %s\n", uriPath );
rootCtx->mbean->setAttribute( env, rootCtx->mbean, "context", "/" );
}
}
@@ -408,8 +405,9 @@
if( uriEnv==NULL ) {
env->createBean2( env, uriMap->mbean->pool, "uri", "/" );
uriEnv=env->getByName2( env, "uri", "/" );
- env->l->jkLog(env, env->l, JK_LOG_INFO,
- "uriMap.init() Create default context / ( for default host )\n" );
+ if( uriMap->mbean->debug > 0 )
+ env->l->jkLog(env, env->l, JK_LOG_INFO,
+ "uriMap.init() Create default context / ( for default host )\n" );
uriEnv->mbean->setAttribute( env, uriEnv->mbean, "context", "/" );
}
@@ -430,7 +428,7 @@
char *vhost= uriEnv->virtual;
jk_uriEnv_t *hostEnv=jk2_uriMap_hostMap( env, uriMap, vhost );
- if( uriMap->debug > 5 )
+ if( uriMap->mbean->debug > 5 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.init() loaded context %s %s %p %p %p\n",
uriEnv->virtual, context, hostEnv, hostEnv->webapps,
@@ -448,7 +446,7 @@
}
}
- if( uriMap->debug > 5 )
+ if( uriMap->mbean->debug > 5 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.init() processing mappings\n");
@@ -493,7 +491,7 @@
static void jk2_uriMap_destroy(jk_env_t *env, jk_uriMap_t *uriMap)
{
- if( uriMap->debug > 0 )
+ if( uriMap->mbean->debug > 0 )
env->l->jkLog(env, env->l, JK_LOG_INFO, "uriMap.destroy()\n");
/* this can't be null ( or a NPE would have been generated */
@@ -569,7 +567,7 @@
if( uriMap == NULL || uri==NULL )
return NULL;
- if( uriMap->debug > 1 )
+ if( uriMap->mbean->debug > 1 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.mapUri() %s %s\n", vhost, uri);
@@ -581,7 +579,7 @@
hostEnv=jk2_uriMap_hostMap( env, uriMap, vhost );
- if( uriMap->debug > 1 )
+ if( uriMap->mbean->debug > 1 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.mapUri() found host %s\n", hostEnv->virtual);
@@ -590,7 +588,7 @@
if(url_rewrite) {
origChar=*url_rewrite;
*url_rewrite = '\0';
- if( uriMap->debug > 0 )
+ if( uriMap->mbean->debug > 0 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.mapUri() rewrote uri %s \n",uri );
}
@@ -606,7 +604,7 @@
return NULL;
}
- if( uriMap->debug > 1 )
+ if( uriMap->mbean->debug > 1 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.mapUri() found ctx %s\n", ctxEnv->uri);
@@ -615,7 +613,7 @@
if( match != NULL ) {
/* restore */
if( url_rewrite ) *url_rewrite=origChar;
- if( uriMap->debug > 0 )
+ if( uriMap->mbean->debug > 0 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.mapUri() exact match %s %s\n",
uri, match->workerName );
@@ -627,7 +625,7 @@
if( match != NULL ) {
/* restore */
if( url_rewrite ) *url_rewrite=origChar;
- if( uriMap->debug > 0 )
+ if( uriMap->mbean->debug > 0 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.mapUri() prefix match %s %s\n",
uri, match->workerName );
@@ -643,7 +641,7 @@
if( match != NULL ) {
/* restore */
if( url_rewrite ) *url_rewrite=origChar;
- if( uriMap->debug > 0 )
+ if( uriMap->mbean->debug > 0 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.mapUri() extension match %s %s\n",
uri, match->workerName );
@@ -658,7 +656,7 @@
/* if(uwr->prefix_len >= longest_match) { */
/* int suffix_start=jk2_last_index_of(uri,uwr->suffix[0]); */
/* if (suffix_start>=0 && 0==strcmp(uri+suffix_start,uwr->suffix)) { */
-/* if( uriMap->debug > 0 ) */
+/* if( uriMap->mbean->debug > 0 ) */
/* env->l->jkLog(env, env->l, JK_LOG_INFO, */
/* "uriMap.mapUri() general suffix match %s\n", */
/* uwr->suffix ); */
@@ -687,7 +685,7 @@
if( url_rewrite )
*url_rewrite=origChar;
- if( uriMap->debug > 1 )
+ if( uriMap->mbean->debug > 1 )
env->l->jkLog(env, env->l, JK_LOG_INFO,
"uriMap.mapUri() no match found\n");
@@ -718,7 +716,6 @@
uriMap->addUriEnv=jk2_uriMap_addUriEnv;
uriMap->checkUri=jk2_uriMap_checkUri;
uriMap->mapUri=jk2_uriMap_mapUri;
- uriMap->debug= 0;
result->object=uriMap;
result->setAttribute=jk2_uriMap_setProperty;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>