tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_uriEnv.c jk_uriMap.c
Date Wed, 01 May 2002 17:23:14 GMT
costin      02/05/01 10:23:14

  Modified:    jk/native2/common jk_uriEnv.c jk_uriMap.c
  Log:
  Reduce verbosity of messages.
  
  Fix a mapping bug for prefix mappings ( it is in jk1 too, but there you
  get around by using the 'general prefix mapping' - /examples* or by
  mapping both /examples and /examples/* ). ( the bug was that /examples/*
  did matched the ending / ).
  
  After I get the web.xml->jk converter I'll start watchdog-ing.
  
  ( I just added filter support )
  
  Revision  Changes    Path
  1.14      +18 -16    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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- jk_uriEnv.c	30 Apr 2002 06:44:57 -0000	1.13
  +++ jk_uriEnv.c	1 May 2002 17:23:14 -0000	1.14
  @@ -82,8 +82,8 @@
   {
       char *n=name;
       char *slash=strchr( name, '/' );
  -
  -    fprintf( stderr, "XXX parseURI %s\n", name );
  +    
  +    /* fprintf( stderr, "XXX parseURI %s\n", name ); */
       
       if( slash==NULL ) {
           /* That's a virtual host definition ( no actual mapping, just global
  @@ -214,16 +214,17 @@
           uriEnv->workerName=uriEnv->uriMap->workerEnv->defaultWorker->mbean->name;;
           uriEnv->worker=uriEnv->uriMap->workerEnv->defaultWorker;
   
  -        env->l->jkLog(env, env->l, JK_LOG_DEBUG,
  -                      "uriMap.init() map %s %s\n",
  -                      uriEnv->uri, uriEnv->uriMap->workerEnv->defaultWorker->mbean->name);
  +        if( uriEnv->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);
       }
   
       if( uriEnv->workerName != NULL && uriEnv->worker==NULL ) {
           uriEnv->worker= env->getByName( env, wname );
           if( uriEnv->worker==NULL ) {
               env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                          "uriMap.init() map to invalid worker %s %s\n",
  +                          "uriEnv.init() map to invalid worker %s %s\n",
                             uriEnv->uri, uriEnv->workerName);
               /* XXX that's allways a 'lb' worker, create it */
           }
  @@ -240,7 +241,7 @@
            * not arrive here when using Apache.
            */
           env->l->jkLog(env, env->l, JK_LOG_ERROR,
  -                      "uriMap.addMapping() context must start with '/' in %s\n",
  +                      "uriEnv.init() context must start with '/' in %s\n",
                         uri);
           return JK_ERR;
       }
  @@ -261,16 +262,16 @@
           if( uriEnv->debug > 0 ) {
               if( uriEnv->match_type == MATCH_TYPE_CONTEXT ) {
                   env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                              "uriMap.addMapping() context mapping %s=%s \n",
  +                              "uriEnv.init() context mapping %s=%s \n",
                                 uriEnv->prefix, uriEnv->workerName);
                   
               } else if( uriEnv->match_type == MATCH_TYPE_HOST ) {
                   env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                              "uriMap.addMapping() host mapping %s=%s \n",
  +                              "uriEnv.init() host mapping %s=%s \n",
                                 uriEnv->virtual, uriEnv->workerName);
               } else {
                   env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                              "uriMap.addMapping() exact mapping %s=%s \n",
  +                              "uriEnv.init() exact mapping %s=%s \n",
                                 uriEnv->prefix, uriEnv->workerName);
               }
           }
  @@ -312,7 +313,7 @@
               uriEnv->match_type  = MATCH_TYPE_SUFFIX;
               if( uriEnv->debug > 0 ) {
                   env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                              "uriMap.addMapping() suffix mapping %s .%s=%s was added\n",
  +                              "uriEnv.init() suffix mapping %s .%s=%s was added\n",
                                 uriEnv->prefix, uriEnv->suffix, uriEnv->workerName);
               }
           } else if ('\0' != asterisk[2]) {
  @@ -324,19 +325,20 @@
               uriEnv->match_type = MATCH_TYPE_GENERAL_SUFFIX;
               if( uriEnv->debug > 0 ) {
                   env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                              "uriMap.addMapping() general suffix mapping %s.%s=%s\n",
  +                              "uriEnv.init() general suffix mapping %s.%s=%s\n",
                                 uri, asterisk + 2, uriEnv->workerName);
               }
           } else {
  -                /* context based /context/prefix/ASTERISK  */
  +            /* context based /context/prefix/ASTERISK  */
               asterisk[1]      = '\0';
  +            asterisk[0]      = '\0'; /* Remove the extra '/' */
               uriEnv->suffix      = NULL;
               uriEnv->prefix      = uri;
               uriEnv->prefix_len  =strlen( uriEnv->prefix );
               uriEnv->match_type  = MATCH_TYPE_PREFIX;
               if( uriEnv->debug > 0 ) {
                   env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                              "uriMap.addMapping() prefix mapping %s=%s\n",
  +                              "uriEnv.init() prefix mapping %s=%s\n",
                                 uriEnv->prefix, uriEnv->workerName);
               }
           }
  @@ -349,7 +351,7 @@
           uriEnv->match_type  = MATCH_TYPE_PREFIX;
           if( uriEnv->debug > 0 ) {
               env->l->jkLog(env, env->l, JK_LOG_INFO,
  -                          "uriMap.addMapping() prefix mapping2 %s=%s\n",
  +                          "uriEnv.init() prefix mapping2 %s=%s\n",
                             uri, uriEnv->workerName);
           }
       }
  @@ -375,7 +377,7 @@
       
       jk2_map_default_create( env, &uriEnv->properties, uriPool );
   
  -    uriEnv->debug=10;
  +    uriEnv->debug=0;
       uriEnv->init=jk2_uriEnv_init;
   
       result->setAttribute=jk2_uriEnv_setAttribute;
  
  
  
  1.28      +5 -8      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.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- jk_uriMap.c	30 Apr 2002 06:49:21 -0000	1.27
  +++ jk_uriMap.c	1 May 2002 17:23:14 -0000	1.28
  @@ -332,9 +332,6 @@
       jk_workerEnv_t *workerEnv=uriMap->workerEnv;
       jk_bean_t *mbean;
   
  -    if( uriMap->debug > 0 ) 
  -        env->l->jkLog(env, env->l, JK_LOG_INFO, "uriMap.init()\n"); 
  -
       mbean=env->getBean2( env, "uri", "" );
       if( mbean==NULL )
           mbean=env->createBean2(env, workerEnv->pool,"uri", "");
  @@ -345,7 +342,7 @@
       }
       uriMap->defaultVhost=mbean->object;
       
  -    if( uriMap->debug > 0 ) 
  +    if( uriMap->debug > 5 ) 
           env->l->jkLog(env, env->l, JK_LOG_INFO, "uriMap.init() set default host\n");

   
       /* Initialize the vhosts table */
  @@ -359,7 +356,7 @@
                   uriMap->vhosts->put( env, uriMap->vhosts,
                                        uriEnv->virtual, uriEnv, NULL );
               }
  -            if( uriMap->debug > 0 ) 
  +            if( uriMap->debug > 5 ) 
                   env->l->jkLog(env, env->l, JK_LOG_INFO,
                                 "uriMap.init() loaded host %s\n",uriEnv->virtual); 
           }
  @@ -396,7 +393,7 @@
               char *vhost= uriEnv->virtual;
               jk_uriEnv_t *hostEnv=jk2_uriMap_hostMap( env, uriMap, vhost );
   
  -            if( uriMap->debug > 0 ) 
  +            if( uriMap->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,
  @@ -415,7 +412,7 @@
       }
   
   
  -    if( uriMap->debug > 0 ) 
  +    if( uriMap->debug > 5 ) 
           env->l->jkLog(env, env->l, JK_LOG_INFO,
                         "uriMap.init() processing mappings\n");
   
  @@ -680,7 +677,7 @@
       uriMap->addUriEnv=jk2_uriMap_addUriEnv;
       uriMap->checkUri=jk2_uriMap_checkUri;
       uriMap->mapUri=jk2_uriMap_mapUri;
  -    uriMap->debug= 10;
  +    uriMap->debug= 1;
               
       result->object=uriMap;
       result->setAttribute=jk2_uriMap_setProperty;
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message