Author: skitching
Date: Wed Mar 8 19:01:56 2006
New Revision: 384410
URL: http://svn.apache.org/viewcvs?rev=384410&view=rev
Log:
Rename some stuff for clarity; no functional change.
Modified:
jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/LogFactory.java
jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/LogHandler.java
Modified:
jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/LogFactory.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/LogFactory.java?rev=384410&r1=384409&r2=384410&view=diff
==============================================================================
---
jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/LogFactory.java
(original)
+++
jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/LogFactory.java
Wed Mar 8 19:01:56 2006
@@ -34,8 +34,8 @@
public abstract class LogFactory {
- private static final LogFactory instance = discoverInstance();
-
+ private static final LogFactory instance = discoverLogFactory();
+
/**
* Each jarfile that contains this class is also expected to contain:
* <ul>
@@ -46,7 +46,7 @@
* the concrete class. An instance of that type will be created, and
* all methods on this class then simply delegate to that instance.
*/
- private static LogFactory discoverInstance() {
+ private static LogFactory discoverLogFactory() {
return (LogFactory) Utils.createServiceInstance(LogFactory.class);
}
@@ -56,7 +56,7 @@
* @param clazz Class from which a log name will be derived
*/
public static Log getLog(Class clazz) {
- return instance.getInstance(clazz);
+ return instance.getLogFor(clazz);
}
/**
@@ -67,7 +67,7 @@
* logging implementation that is being wrapped)
*/
public static Log getLog(String name) {
- return instance.getInstance(name);
+ return instance.getLogFor(name);
}
/**
@@ -75,16 +75,13 @@
* concrete library.
*/
public static void release() {
- instance.release();
+ instance.releaseResources();
}
/**
* Get an instance of Log whose category matches the specified class.
- * <p>
- * This method would perhaps be better named "getLog", but that name
- * is already taken by the static method on this class.
*/
- protected abstract Log getInstance(Class clazz);
+ protected abstract Log getLogFor(Class clazz);
/**
* Get an instance of Log whose category matches the specified string.
@@ -92,13 +89,11 @@
* This method would perhaps be better named "getLog", but that name
* is already taken by the static method on this class.
*/
- protected abstract Log getInstance(String category);
+ protected abstract Log getLogFor(String category);
/**
- * Release all resources.
- * <p>
- * This method would perhaps be better named "release", but that name
- * is already taken by the static method on this class.
+ * Release all resources, presumably in preparation for shutdown of
+ * this application.
*/
- protected abstract void releaseInstance();
+ protected abstract void releaseResources();
}
Modified:
jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/LogHandler.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/LogHandler.java?rev=384410&r1=384409&r2=384410&view=diff
==============================================================================
---
jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/LogHandler.java
(original)
+++
jakarta/commons/proper/logging/contrib/simon/jcl2/core/java/org/apache/commons/logging/LogHandler.java
Wed Mar 8 19:01:56 2006
@@ -24,7 +24,7 @@
*/
public interface LogHandler {
- public Log getLog(Class clazz);
- public Log getLog(String category);
- public void release();
+ public Log getLogFor(Class clazz);
+ public Log getLogFor(String category);
+ public void releaseResources();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]