costin      01/02/02 21:22:19

  Modified:    src/share/org/apache/tomcat/modules/config PathSetter.java
  Log:
  Finishing the LogSetter - the module that deals with Log is the
  LogSetter, there is no need for the hack in DefaultCMSetter/PathSetter.
  
  ( the problem was that logs were set in a "special" way by server.xml.
  Now it's just a regular module that has full access to all the
  hooks and methods - no need for hacks )
  
  Revision  Changes    Path
  1.3       +2 -29     
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/PathSetter.java
  
  Index: PathSetter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/PathSetter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PathSetter.java   2001/02/01 07:00:18     1.2
  +++ PathSetter.java   2001/02/03 05:22:19     1.3
  @@ -77,6 +77,8 @@
    *
    * You don't have to insert this in server.xml - it's better to add it
    * manually, to be sure it is first.
  + *
  + * Will set: tomcat.home, CM.home, CM.installDir, CM.workDir, Ctx.absolutePath
    * 
    * ( based on DefaultCMSetter )
    *
  @@ -176,31 +178,11 @@
                                 workDir);
        }
        cm.setWorkDir( workDir );
  -        initLoggers(cm.getLoggers());
   
        if(debug>1) log( "Setting: " + cm.getInstallDir() + " " +
                         cm.getHome() + " " + workDir);
       }
   
  -    private void initLoggers(Hashtable Loggers){
  -        if( Loggers!=null ){
  -            Enumeration el=Loggers.elements();
  -            while( el.hasMoreElements()){
  -                Logger l=(Logger)el.nextElement();
  -                String path=l.getPath();
  -                if( path!=null ) {
  -                    File f=new File( path );
  -                    if( ! f.isAbsolute() ) {
  -                        File wd= new File(cm.getHome(), f.getPath());
  -                        l.setPath( wd.getAbsolutePath() );
  -                    }
  -                    // create the files, ready to log.
  -                }
  -                l.open();
  -            }
  -        }
  -    }
  -
       /** Adjust paths for a context - make the base and all loggers
        *  point to canonical paths.
        */
  @@ -229,15 +211,6 @@
                 cm.getHome());
        }
        
  -     // this would belong to a logger interceptor ?
  -     Log loghelper=ctx.getLog();
  -     Log loghelperServlet=ctx.getServletLog();
  -     
  -     if( loghelper!=null && loghelper.getLogger() != null )
  -         cm.addLogger( loghelper.getLogger() );
  -     if( loghelperServlet != null &&
  -         loghelperServlet.getLogger() != null)
  -         cm.addLogger( loghelperServlet.getLogger() );
       }
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to