tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/docs changelog.xml
Date Fri, 25 Mar 2005 08:29:39 GMT
pero        2005/03/25 00:29:38

  Modified:    catalina/src/share/org/apache/catalina/realm JNDIRealm.java
                        RealmBase.java
               webapps/docs changelog.xml
  Log:
  Fix some RealmBase/JNDIRealm log.isXXXEnabled
  
  Revision  Changes    Path
  1.23      +3 -2      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
  
  Index: JNDIRealm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- JNDIRealm.java	24 Mar 2005 17:12:50 -0000	1.22
  +++ JNDIRealm.java	25 Mar 2005 08:29:32 -0000	1.23
  @@ -1065,7 +1065,8 @@
   
           // Check no further entries were found
           if (results.hasMore()) {
  -            containerLog.info("username " + username + " has multiple entries");
  +            if(containerLog.isInfoEnabled())
  +                containerLog.info("username " + username + " has multiple entries");
               return (null);
           }
   
  
  
  
  1.50      +19 -11    jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/RealmBase.java
  
  Index: RealmBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/RealmBase.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- RealmBase.java	2 Mar 2005 19:27:11 -0000	1.49
  +++ RealmBase.java	25 Mar 2005 08:29:34 -0000	1.50
  @@ -741,10 +741,12 @@
                       response.sendError
                           (HttpServletResponse.SC_FORBIDDEN,
                            sm.getString("realmBase.forbidden"));
  -                    if( log.isDebugEnabled() ) log.debug("No roles ");
  +                    if( log.isDebugEnabled() )
  +                        log.debug("No roles ");
                       return (false); // No listed roles means no access at all
                   } else {
  -                    log.debug("Passing all access");
  +                    if(log.isDebugEnabled())
  +                        log.debug("Passing all access");
                       return (true);
                   }
               } else if (principal == null) {
  @@ -793,7 +795,8 @@
   
           GenericPrincipal gp = (GenericPrincipal) principal;
           if (!(gp.getRealm() == this)) {
  -            log.debug("Different realm " + this + " " + gp.getRealm());//    return (false);
  +            if(log.isDebugEnabled())
  +                log.debug("Different realm " + this + " " + gp.getRealm());//    return
(false);
           }
           boolean result = gp.hasRole(role);
           if (log.isDebugEnabled()) {
  @@ -956,7 +959,8 @@
   
           // Validate and update our current component state
           if (started) {
  -            log.info(sm.getString("realmBase.alreadyStarted"));
  +            if(log.isInfoEnabled())
  +                log.info(sm.getString("realmBase.alreadyStarted"));
               return;
           }
           if( !initialized ) {
  @@ -992,7 +996,8 @@
   
           // Validate and update our current component state
           if (!started) {
  -            log.info(sm.getString("realmBase.notStarted"));
  +            if(log.isInfoEnabled())
  +                log.info(sm.getString("realmBase.notStarted"));
               return;
           }
           lifecycle.fireLifecycleEvent(STOP_EVENT, null);
  @@ -1011,7 +1016,8 @@
           if ( oname!=null ) {   
               try {   
                   Registry.getRegistry(null, null).unregisterComponent(oname); 
  -                log.debug( "unregistering realm " + oname );   
  +                if(log.isDebugEnabled())
  +                    log.debug( "unregistering realm " + oname );   
               } catch( Exception ex ) {   
                   log.error( "Can't unregister realm " + oname, ex);   
               }      
  @@ -1161,7 +1167,7 @@
               // Digest the credentials and return as hexadecimal
               return (HexUtils.convert(md.digest()));
           } catch(Exception ex) {
  -            ex.printStackTrace();
  +            log.error(ex);
               return credentials;
           }
   
  @@ -1268,11 +1274,12 @@
                               host + path);
                   }
                   if( mserver.isRegistered(parent ))  {
  -                    log.debug("Register with " + parent);
  +                    if(log.isDebugEnabled())
  +                        log.debug("Register with " + parent);
                       mserver.setAttribute(parent, new Attribute("realm", this));
                   }
               } catch (Exception e) {
  -                log.info("Parent not available yet: " + parent);  
  +                log.error("Parent not available yet: " + parent);  
               }
           }
           
  @@ -1282,7 +1289,8 @@
                   ContainerBase cb=(ContainerBase)container;
                   oname=new ObjectName(cb.getDomain()+":type=Realm" + cb.getContainerSuffix());
                   Registry.getRegistry(null, null).registerComponent(this, oname, null );
  -                log.debug("Register Realm "+oname);
  +                if(log.isDebugEnabled())
  +                    log.debug("Register Realm "+oname);
               } catch (Throwable e) {
                   log.error( "Can't register " + oname, e);
               }
  
  
  
  1.268     +3 -0      jakarta-tomcat-catalina/webapps/docs/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v
  retrieving revision 1.267
  retrieving revision 1.268
  diff -u -r1.267 -r1.268
  --- changelog.xml	25 Mar 2005 04:02:34 -0000	1.267
  +++ changelog.xml	25 Mar 2005 08:29:34 -0000	1.268
  @@ -131,6 +131,9 @@
         <fix>
           <bug>32867</bug>: Reset distributable attribute in context for clean
reload handling (yoavs)
         </fix>
  +      <update>
  +          Fix some RealmBase/JNDIRealm log.isXXXEnabled (pero)
  +      </update>
       </changelog>
      </subsection>
      
  
  
  

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


Mime
View raw message