tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-5 tomcat.nsi
Date Fri, 29 Jul 2005 15:35:48 GMT
remm        2005/07/29 08:35:48

  Modified:    juli/src/java/org/apache/juli ClassLoaderLogManager.java
               .        tomcat.nsi
  Log:
  - The current logging configuration depends on catalina.base, which is defined
    after bootstrap.
  - Improve a bit so that a non existent configuration file doesn't crash
    (I didn't test fallback that well yet, however).
  
  Revision  Changes    Path
  1.11      +17 -7     jakarta-tomcat-connectors/juli/src/java/org/apache/juli/ClassLoaderLogManager.java
  
  Index: ClassLoaderLogManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/juli/src/java/org/apache/juli/ClassLoaderLogManager.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ClassLoaderLogManager.java	27 Apr 2005 21:54:01 -0000	1.10
  +++ ClassLoaderLogManager.java	29 Jul 2005 15:35:48 -0000	1.11
  @@ -299,13 +299,23 @@
               is = classLoader.getResourceAsStream("logging.properties");
           }
           if ((is == null) && (classLoader == ClassLoader.getSystemClassLoader()))
{
  -            String configFile = System.getProperty("java.util.logging.config.file",
  -                    (new File(new File(System.getProperty("java.home"), "lib"), 
  -                            "logging.properties").getAbsolutePath()));
  -            try {
  -                is = new FileInputStream(replace(configFile));
  -            } catch (IOException e) {
  -                // Ignore
  +            String configFileStr = System.getProperty("java.util.logging.config.file");
  +            if (configFileStr != null) {
  +                try {
  +                    is = new FileInputStream(replace(configFileStr));
  +                } catch (IOException e) {
  +                    // Ignore
  +                }
  +            }
  +            // Try the default JVM configuration
  +            if (is == null) {
  +                File defaultFile = new File(new File(System.getProperty("java.home"), "lib"),

  +                    "logging.properties");
  +                try {
  +                    is = new FileInputStream(defaultFile);
  +                } catch (IOException e) {
  +                    // Critical problem, do something ...
  +                }
               }
           }
           
  
  
  
  1.77      +2 -2      jakarta-tomcat-5/tomcat.nsi
  
  Index: tomcat.nsi
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-5/tomcat.nsi,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- tomcat.nsi	28 Jul 2005 14:17:51 -0000	1.76
  +++ tomcat.nsi	29 Jul 2005 15:35:48 -0000	1.77
  @@ -310,7 +310,7 @@
   
   Section -post
     nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //US//Tomcat5 --Classpath "$INSTDIR\bin\bootstrap.jar"
--StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap
--StartParams start --StopParams stop  --StartMode jvm --StopMode jvm'
  -  nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //US//Tomcat5 --JvmOptions "-Dcatalina.home=$INSTDIR#-Djava.endorsed.dirs=$INSTDIR\common\endorsed#-Djava.io.tmpdir=$INSTDIR\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=${catalina.base}\conf\logging.properties"
--StdOutput auto --StdError auto'
  +  nsExec::ExecToLog '"$INSTDIR\bin\tomcat5.exe" //US//Tomcat5 --JvmOptions "-Dcatalina.home=$INSTDIR#-Dcatalina.base=$INSTDIR#-Djava.endorsed.dirs=$INSTDIR\common\endorsed#-Djava.io.tmpdir=$INSTDIR\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=${catalina.base}\conf\logging.properties"
--StdOutput auto --StdError auto'
   
     WriteUninstaller "$INSTDIR\Uninstall.exe"
   
  
  
  

---------------------------------------------------------------------
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