vmassol     01/08/19 09:43:17

  Modified:    cactus/src/framework/share/org/apache/commons/cactus/util/log
                        BaseLog.java BaseLogDummy.java Log.java
                        LogService.java
  Log:
  align with coding conventions
  
  Revision  Changes    Path
  1.3       +17 -13    
jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/log/BaseLog.java
  
  Index: BaseLog.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/log/BaseLog.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BaseLog.java      2001/06/18 20:23:28     1.2
  +++ BaseLog.java      2001/08/19 16:43:16     1.3
  @@ -63,6 +63,10 @@
    * name).
    *
    * The order of priority is as follows : ERROR > WARNING > DEBUG > INFO
  + *
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
  + *
  + * @version $Id: BaseLog.java,v 1.3 2001/08/19 16:43:16 vmassol Exp $
    */
   public class BaseLog implements Log
   {
  @@ -77,7 +81,7 @@
        */
       public BaseLog(String theCategoryName)
       {
  -     category = Category.getInstance(theCategoryName);
  +     this.category = Category.getInstance(theCategoryName);
       }
   
       /**
  @@ -87,7 +91,7 @@
        */
       public void debug(String theMessage)
       {
  -        category.debug(theMessage);
  +        this.category.debug(theMessage);
       }
   
       /**
  @@ -98,7 +102,7 @@
        */
       public void debug(String theMessage, Throwable theThrowable)
       {
  -        category.debug(theMessage, theThrowable);
  +        this.category.debug(theMessage, theThrowable);
       }
   
       /**
  @@ -108,7 +112,7 @@
        */
       public void error(String theMessage)
       {
  -        category.error(theMessage);
  +        this.category.error(theMessage);
       }
   
       /**
  @@ -119,7 +123,7 @@
        */
       public void error(String theMessage, Throwable theThrowable)
       {
  -        category.error(theMessage, theThrowable);
  +        this.category.error(theMessage, theThrowable);
       }
   
       /**
  @@ -130,7 +134,7 @@
        */
       public void error(Throwable theThrowable)
       {
  -        category.error("", theThrowable);
  +        this.category.error("", theThrowable);
       }
   
       /**
  @@ -140,7 +144,7 @@
        */
       public void info(String theMessage)
       {
  -        category.info(theMessage);
  +        this.category.info(theMessage);
       }
   
       /**
  @@ -151,7 +155,7 @@
        */
       public void info(String theMessage, Throwable theThrowable)
       {
  -        category.info(theMessage, theThrowable);
  +        this.category.info(theMessage, theThrowable);
       }
   
       /**
  @@ -161,7 +165,7 @@
        */
       public void warn(String theMessage)
       {
  -        category.warn(theMessage);
  +        this.category.warn(theMessage);
       }
   
       /**
  @@ -172,7 +176,7 @@
        */
       public void warn(String theMessage, Throwable theThrowable)
       {
  -        category.warn(theMessage, theThrowable);
  +        this.category.warn(theMessage, theThrowable);
       }
   
       /**
  @@ -182,7 +186,7 @@
        */
       public void entry(String theMessage)
       {
  -        category.debug('>' + theMessage);
  +        this.category.debug('>' + theMessage);
       }
   
       /**
  @@ -192,7 +196,7 @@
        */
       public void exit(String theMessage)
       {
  -        category.debug('<' + theMessage);
  +        this.category.debug('<' + theMessage);
       }
   
       /**
  @@ -200,7 +204,7 @@
        */
       public boolean isDebugEnabled()
       {
  -        return category.isDebugEnabled();
  +        return this.category.isDebugEnabled();
       }
   
   }
  
  
  
  1.2       +4 -0      
jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/log/BaseLogDummy.java
  
  Index: BaseLogDummy.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/log/BaseLogDummy.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BaseLogDummy.java 2001/06/18 20:23:31     1.1
  +++ BaseLogDummy.java 2001/08/19 16:43:16     1.2
  @@ -57,6 +57,10 @@
   
   /**
    * Dummy class that logs nothing.
  + *
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
  + *
  + * @version $Id: BaseLogDummy.java,v 1.2 2001/08/19 16:43:16 vmassol Exp $
    */
   public class BaseLogDummy implements Log
   {
  
  
  
  1.3       +4 -0      
jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/log/Log.java
  
  Index: Log.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/cactus/src/framework/share/org/apache/commons/cactus/util/log/Log.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Log.java  2001/06/18 20:23:29     1.2
  +++ Log.java  2001/08/19 16:43:16     1.3
  @@ -55,6 +55,10 @@
   
   /**
    * Interface for logging implementation classes
  + *
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
  + *
  + * @version $Id: Log.java,v 1.3 2001/08/19 16:43:16 vmassol Exp $
    */
   public interface Log
   {
  
  
  
  1.5       +21 -15    
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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LogService.java   2001/08/14 12:15:48     1.4
  +++ LogService.java   2001/08/19 16:43:16     1.5
  @@ -61,6 +61,10 @@
   /**
    * Logging service acting as a wrapper around the Jakarta Log4j logging
    * framework.
  + *
  + * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
  + *
  + * @version $Id: LogService.java,v 1.5 2001/08/19 16:43:16 vmassol Exp $
    */
   public class LogService
   {
  @@ -94,11 +98,12 @@
           // implementation that does nothing. This is to make it easy on user
           // who do not want to have to download log4j and put it in their
           // classpath !
  -        isLog4jInClasspath = true;
  +        this.isLog4jInClasspath = true;
           try {
  -            Class aClass = Class.forName("org.apache.log4j.PropertyConfigurator");
  +            Class aClass =
  +                Class.forName("org.apache.log4j.PropertyConfigurator");
           } catch (ClassNotFoundException e) {
  -            isLog4jInClasspath = false;
  +            this.isLog4jInClasspath = false;
           }
       }
   
  @@ -107,10 +112,10 @@
        */
       public static synchronized LogService getInstance()
       {
  -        if (instance == null) {
  -            instance = new LogService();
  +        if (this.instance == null) {
  +            this.instance = new LogService();
           }
  -        return instance;
  +        return this.instance;
       }
   
       /**
  @@ -131,7 +136,7 @@
   
           if (theFileName != null) {
   
  -            if (isLog4jInClasspath) {
  +            if (this.isLog4jInClasspath) {
   
                   URL url = this.getClass().getResource(theFileName);
                   if (url != null) {
  @@ -140,15 +145,16 @@
                   } else {
                       // Failed to configure logging system, simply print
                       // a warning on stderr
  -                    System.err.println("Failed to configure logging " +
  -                        "system : Could not find file [" + theFileName + "]");
  +                    System.err.println("[warning] Failed to configure " +
  +                        "logging system : Could not find file [" +
  +                        theFileName + "]");
                   }
   
               }
   
           }
   
  -        isInitialized = true;
  +        this.isInitialized = true;
       }
   
       /**
  @@ -160,21 +166,21 @@
       public synchronized Log getLog(String theCategoryName)
       {
           // Check first if initialization has been performed
  -        if (!isInitialized) {
  +        if (!isInitialized()) {
               throw new RuntimeException("Must call init() first");
           }
   
  -        Log log = (Log)logCategories.get(theCategoryName);
  +        Log log = (Log)this.logCategories.get(theCategoryName);
   
           if (log == null) {
   
  -            if (isLog4jInClasspath) {
  +            if (this.isLog4jInClasspath) {
                   log = new BaseLog(theCategoryName);
               } else {
                   log = new BaseLogDummy(theCategoryName);
               }
   
  -            logCategories.put(theCategoryName, log);
  +            this.logCategories.put(theCategoryName, log);
   
           }
   
  @@ -186,7 +192,7 @@
        */
       public boolean isInitialized()
       {
  -        return isInitialized;
  +        return this.isInitialized;
       }
   
   }
  
  
  

Reply via email to