vmassol     01/06/27 13:44:42

  Modified:    cactus/src/framework/share/org/apache/commons/cactus/util/log
                        LogService.java
  Log:
  minor cosmetic changes ...
  
  Revision  Changes    Path
  1.3       +9 -4      
jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/log/LogService.java
  
  Index: LogService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/log/LogService.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LogService.java   2001/06/18 20:23:30     1.2
  +++ LogService.java   2001/06/27 20:44:41     1.3
  @@ -121,11 +121,16 @@
        */
       public void init(String theFileName)
       {
  -        URL url = LogService.class.getResource(theFileName);
  -
           if (isLog4jInClasspath) {
  -            // Initialize Log4j
  -            PropertyConfigurator.configure(url);
  +
  +            URL url = this.getClass().getResource(theFileName);
  +            if (url != null) {
  +                // Initialize Log4j
  +                PropertyConfigurator.configure(url);
  +            } else {
  +                throw new RuntimeException("Could not find [" + theFileName + "]");
  +            }
  +
           }
   
           isInitialized = true;
  
  
  

Reply via email to