diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index a4bda93..acdad0e 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -16,7 +16,7 @@ --> -$Id: RELEASE-NOTES.txt,v 1.8 2004/09/27 16:21:40 proyal Exp $ +$Id$ Commons Logging Package Version 1.0.4 diff --git a/STATUS.html b/STATUS.html index 48ae636..addf74e 100644 --- a/STATUS.html +++ b/STATUS.html @@ -25,7 +25,7 @@
The code borrows heavily from the SimpleLog class.
* @author Jörg Schaible - * @version $Id: MemoryLog.java,v 1.1 2004/11/04 23:01:39 rdonkin Exp $ + * @version $Id$ */ public class MemoryLog implements Log { diff --git a/optional/src/test/org/apache/commons/logging/TestAll.java b/optional/src/test/org/apache/commons/logging/TestAll.java index 8726e2d..9119c9d 100644 --- a/optional/src/test/org/apache/commons/logging/TestAll.java +++ b/optional/src/test/org/apache/commons/logging/TestAll.java @@ -26,7 +26,7 @@ import org.apache.commons.logging.impl.WeakHashtableTest; * All tests should be written into separateTestSuite's
* and added to this. Don't clutter this class with implementations.
*
- * @version $Revision: 1.2 $
+ * @version $Revision$
*/
public class TestAll extends TestCase {
diff --git a/src/java/org/apache/commons/logging/Log.java b/src/java/org/apache/commons/logging/Log.java
index 93ff184..aa868e8 100644
--- a/src/java/org/apache/commons/logging/Log.java
+++ b/src/java/org/apache/commons/logging/Log.java
@@ -57,7 +57,7 @@ package org.apache.commons.logging;
*
* @author Scott Sanders
* @author Rod Waldhoff
- * @version $Id: Log.java,v 1.19 2004/06/06 21:16:04 rdonkin Exp $
+ * @version $Id$
*/
public interface Log {
diff --git a/src/java/org/apache/commons/logging/LogConfigurationException.java b/src/java/org/apache/commons/logging/LogConfigurationException.java
index 2e9222d..e793516 100644
--- a/src/java/org/apache/commons/logging/LogConfigurationException.java
+++ b/src/java/org/apache/commons/logging/LogConfigurationException.java
@@ -23,7 +23,7 @@ package org.apache.commons.logging;
* factory methods.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.6 $ $Date: 2004/02/28 21:46:45 $
+ * @version $Revision$ $Date$
*/
public class LogConfigurationException extends RuntimeException {
diff --git a/src/java/org/apache/commons/logging/LogFactory.java b/src/java/org/apache/commons/logging/LogFactory.java
index b40b8a9..6a86511 100644
--- a/src/java/org/apache/commons/logging/LogFactory.java
+++ b/src/java/org/apache/commons/logging/LogFactory.java
@@ -42,7 +42,7 @@ import java.util.Properties;
* @author Craig R. McClanahan
* @author Costin Manolache
* @author Richard A. Sitze
- * @version $Revision: 1.28 $ $Date$
+ * @version $Revision$ $Date$
*/
public abstract class LogFactory {
diff --git a/src/java/org/apache/commons/logging/LogSource.java b/src/java/org/apache/commons/logging/LogSource.java
index c137779..00c3324 100644
--- a/src/java/org/apache/commons/logging/LogSource.java
+++ b/src/java/org/apache/commons/logging/LogSource.java
@@ -52,7 +52,7 @@ import org.apache.commons.logging.impl.NoOpLog;
* implementation performs exactly the same algorithm as this class did
*
* @author Rod Waldhoff
- * @version $Id: LogSource.java,v 1.21 2004/02/28 21:46:45 craigmcc Exp $
+ * @version $Id$
*/
public class LogSource {
diff --git a/src/java/org/apache/commons/logging/impl/AvalonLogger.java b/src/java/org/apache/commons/logging/impl/AvalonLogger.java
index 2e4a8cd..56b527e 100644
--- a/src/java/org/apache/commons/logging/impl/AvalonLogger.java
+++ b/src/java/org/apache/commons/logging/impl/AvalonLogger.java
@@ -46,7 +46,7 @@ import org.apache.commons.logging.Log;
* However, serializable is not recommended.
*
* @author Neeme Praks
- * @version $Revision: 1.10 $ $Date$
+ * @version $Revision$ $Date$
*/
public class AvalonLogger implements Log, Serializable {
diff --git a/src/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java b/src/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java
index 1858671..80792b1 100644
--- a/src/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java
+++ b/src/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java
@@ -12,272 +12,272 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- */
-
-
-package org.apache.commons.logging.impl;
-
-
-import java.io.Serializable;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.logging.LogRecord;
-import java.util.StringTokenizer;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-import org.apache.commons.logging.Log;
-
-
-/**
- * Implementation of the org.apache.commons.logging.Log
- * interface that wraps the standard JDK logging mechanisms that are
- * available in SourceForge's Lumberjack for JDKs prior to 1.4.
Gets the class and method by looking at the stack trace for the - * first entry that is not this class.
- */ - private void getClassAndMethod() { - try { - Throwable throwable = new Throwable(); - throwable.fillInStackTrace(); - StringWriter stringWriter = new StringWriter(); - PrintWriter printWriter = new PrintWriter( stringWriter ); - throwable.printStackTrace( printWriter ); - String traceString = stringWriter.getBuffer().toString(); - StringTokenizer tokenizer = - new StringTokenizer( traceString, "\n" ); - tokenizer.nextToken(); - String line = tokenizer.nextToken(); - while ( line.indexOf( this.getClass().getName() ) == -1 ) { - line = tokenizer.nextToken(); - } - while ( line.indexOf( this.getClass().getName() ) >= 0 ) { - line = tokenizer.nextToken(); - } - int start = line.indexOf( "at " ) + 3; - int end = line.indexOf( '(' ); - String temp = line.substring( start, end ); - int lastPeriod = temp.lastIndexOf( '.' ); - sourceClassName = temp.substring( 0, lastPeriod ); - sourceMethodName = temp.substring( lastPeriod + 1 ); - } catch ( Exception ex ) { - // ignore - leave class and methodname unknown - } - classAndMethodFound = true; - } - - /** - * Log a message with debug log level. - */ - public void debug(Object message) { - log(Level.FINE, String.valueOf(message), null); - } - - - /** - * Log a message and exception with debug log level. - */ - public void debug(Object message, Throwable exception) { - log(Level.FINE, String.valueOf(message), exception); - } - - - /** - * Log a message with error log level. - */ - public void error(Object message) { - log(Level.SEVERE, String.valueOf(message), null); - } - - - /** - * Log a message and exception with error log level. - */ - public void error(Object message, Throwable exception) { - log(Level.SEVERE, String.valueOf(message), exception); - } - - - /** - * Log a message with fatal log level. - */ - public void fatal(Object message) { - log(Level.SEVERE, String.valueOf(message), null); - } - - - /** - * Log a message and exception with fatal log level. - */ - public void fatal(Object message, Throwable exception) { - log(Level.SEVERE, String.valueOf(message), exception); - } - - - /** - * Return the native Logger instance we are using. - */ - public Logger getLogger() { - if (logger == null) { - logger = Logger.getLogger(name); - } - return (logger); - } - - - /** - * Log a message with info log level. - */ - public void info(Object message) { - log(Level.INFO, String.valueOf(message), null); - } - - - /** - * Log a message and exception with info log level. - */ - public void info(Object message, Throwable exception) { - log(Level.INFO, String.valueOf(message), exception); - } - - - /** - * Is debug logging currently enabled? - */ - public boolean isDebugEnabled() { - return (getLogger().isLoggable(Level.FINE)); - } - - - /** - * Is error logging currently enabled? - */ - public boolean isErrorEnabled() { - return (getLogger().isLoggable(Level.SEVERE)); - } - - - /** - * Is fatal logging currently enabled? - */ - public boolean isFatalEnabled() { - return (getLogger().isLoggable(Level.SEVERE)); - } - - - /** - * Is info logging currently enabled? - */ - public boolean isInfoEnabled() { - return (getLogger().isLoggable(Level.INFO)); - } - - - /** - * Is trace logging currently enabled? - */ - public boolean isTraceEnabled() { - return (getLogger().isLoggable(Level.FINEST)); - } - - - /** - * Is warn logging currently enabled? - */ - public boolean isWarnEnabled() { - return (getLogger().isLoggable(Level.WARNING)); - } - - - /** - * Log a message with trace log level. - */ - public void trace(Object message) { - log(Level.FINEST, String.valueOf(message), null); - } - - - /** - * Log a message and exception with trace log level. - */ - public void trace(Object message, Throwable exception) { - log(Level.FINEST, String.valueOf(message), exception); - } - - - /** - * Log a message with warn log level. - */ - public void warn(Object message) { - log(Level.WARNING, String.valueOf(message), null); - } - - - /** - * Log a message and exception with warn log level. - */ - public void warn(Object message, Throwable exception) { - log(Level.WARNING, String.valueOf(message), exception); - } - - -} + */ + + +package org.apache.commons.logging.impl; + + +import java.io.Serializable; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.logging.LogRecord; +import java.util.StringTokenizer; +import java.io.PrintWriter; +import java.io.StringWriter; + +import org.apache.commons.logging.Log; + + +/** + *Implementation of the org.apache.commons.logging.Log
+ * interface that wraps the standard JDK logging mechanisms that are
+ * available in SourceForge's Lumberjack for JDKs prior to 1.4.
Gets the class and method by looking at the stack trace for the + * first entry that is not this class.
+ */ + private void getClassAndMethod() { + try { + Throwable throwable = new Throwable(); + throwable.fillInStackTrace(); + StringWriter stringWriter = new StringWriter(); + PrintWriter printWriter = new PrintWriter( stringWriter ); + throwable.printStackTrace( printWriter ); + String traceString = stringWriter.getBuffer().toString(); + StringTokenizer tokenizer = + new StringTokenizer( traceString, "\n" ); + tokenizer.nextToken(); + String line = tokenizer.nextToken(); + while ( line.indexOf( this.getClass().getName() ) == -1 ) { + line = tokenizer.nextToken(); + } + while ( line.indexOf( this.getClass().getName() ) >= 0 ) { + line = tokenizer.nextToken(); + } + int start = line.indexOf( "at " ) + 3; + int end = line.indexOf( '(' ); + String temp = line.substring( start, end ); + int lastPeriod = temp.lastIndexOf( '.' ); + sourceClassName = temp.substring( 0, lastPeriod ); + sourceMethodName = temp.substring( lastPeriod + 1 ); + } catch ( Exception ex ) { + // ignore - leave class and methodname unknown + } + classAndMethodFound = true; + } + + /** + * Log a message with debug log level. + */ + public void debug(Object message) { + log(Level.FINE, String.valueOf(message), null); + } + + + /** + * Log a message and exception with debug log level. + */ + public void debug(Object message, Throwable exception) { + log(Level.FINE, String.valueOf(message), exception); + } + + + /** + * Log a message with error log level. + */ + public void error(Object message) { + log(Level.SEVERE, String.valueOf(message), null); + } + + + /** + * Log a message and exception with error log level. + */ + public void error(Object message, Throwable exception) { + log(Level.SEVERE, String.valueOf(message), exception); + } + + + /** + * Log a message with fatal log level. + */ + public void fatal(Object message) { + log(Level.SEVERE, String.valueOf(message), null); + } + + + /** + * Log a message and exception with fatal log level. + */ + public void fatal(Object message, Throwable exception) { + log(Level.SEVERE, String.valueOf(message), exception); + } + + + /** + * Return the native Logger instance we are using. + */ + public Logger getLogger() { + if (logger == null) { + logger = Logger.getLogger(name); + } + return (logger); + } + + + /** + * Log a message with info log level. + */ + public void info(Object message) { + log(Level.INFO, String.valueOf(message), null); + } + + + /** + * Log a message and exception with info log level. + */ + public void info(Object message, Throwable exception) { + log(Level.INFO, String.valueOf(message), exception); + } + + + /** + * Is debug logging currently enabled? + */ + public boolean isDebugEnabled() { + return (getLogger().isLoggable(Level.FINE)); + } + + + /** + * Is error logging currently enabled? + */ + public boolean isErrorEnabled() { + return (getLogger().isLoggable(Level.SEVERE)); + } + + + /** + * Is fatal logging currently enabled? + */ + public boolean isFatalEnabled() { + return (getLogger().isLoggable(Level.SEVERE)); + } + + + /** + * Is info logging currently enabled? + */ + public boolean isInfoEnabled() { + return (getLogger().isLoggable(Level.INFO)); + } + + + /** + * Is trace logging currently enabled? + */ + public boolean isTraceEnabled() { + return (getLogger().isLoggable(Level.FINEST)); + } + + + /** + * Is warn logging currently enabled? + */ + public boolean isWarnEnabled() { + return (getLogger().isLoggable(Level.WARNING)); + } + + + /** + * Log a message with trace log level. + */ + public void trace(Object message) { + log(Level.FINEST, String.valueOf(message), null); + } + + + /** + * Log a message and exception with trace log level. + */ + public void trace(Object message, Throwable exception) { + log(Level.FINEST, String.valueOf(message), exception); + } + + + /** + * Log a message with warn log level. + */ + public void warn(Object message) { + log(Level.WARNING, String.valueOf(message), null); + } + + + /** + * Log a message and exception with warn log level. + */ + public void warn(Object message, Throwable exception) { + log(Level.WARNING, String.valueOf(message), exception); + } + + +} diff --git a/src/java/org/apache/commons/logging/impl/Jdk14Logger.java b/src/java/org/apache/commons/logging/impl/Jdk14Logger.java index d56cfde..ba2cb8e 100644 --- a/src/java/org/apache/commons/logging/impl/Jdk14Logger.java +++ b/src/java/org/apache/commons/logging/impl/Jdk14Logger.java @@ -33,7 +33,7 @@ import org.apache.commons.logging.Log; * @author Scott Sanders * @author Berin Loritsch * @author Peter Donald - * @version $Revision: 1.13 $ $Date: 2004/06/06 21:10:21 $ + * @version $Revision$ $Date$ */ public class Jdk14Logger implements Log, Serializable { diff --git a/src/java/org/apache/commons/logging/impl/Log4JLogger.java b/src/java/org/apache/commons/logging/impl/Log4JLogger.java index f06ccc0..adbc093 100644 --- a/src/java/org/apache/commons/logging/impl/Log4JLogger.java +++ b/src/java/org/apache/commons/logging/impl/Log4JLogger.java @@ -32,7 +32,7 @@ import org.apache.log4j.Level; * @author Scott Sanders * @author Rod Waldhoff * @author Robert Burrell Donkin - * @version $Id: Log4JLogger.java,v 1.11 2004/05/19 21:01:23 rdonkin Exp $ + * @version $Id$ */ public class Log4JLogger implements Log, Serializable { diff --git a/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java b/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java index 373ca14..df0ba52 100644 --- a/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java +++ b/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java @@ -63,7 +63,7 @@ import org.apache.commons.logging.LogFactory; * @author Rod Waldhoff * @author Craig R. McClanahan * @author Richard A. Sitze - * @version $Revision: 1.36 $ $Date: 2004/10/31 17:53:48 $ + * @version $Revision$ $Date$ */ public class LogFactoryImpl extends LogFactory { diff --git a/src/java/org/apache/commons/logging/impl/LogKitLogger.java b/src/java/org/apache/commons/logging/impl/LogKitLogger.java index c904ed1..7351cb9 100644 --- a/src/java/org/apache/commons/logging/impl/LogKitLogger.java +++ b/src/java/org/apache/commons/logging/impl/LogKitLogger.java @@ -34,7 +34,7 @@ import org.apache.commons.logging.Log; * * @author Scott Sanders * @author Robert Burrell Donkin - * @version $Id: LogKitLogger.java,v 1.9 2004/06/01 19:56:46 rdonkin Exp $ + * @version $Id$ */ public class LogKitLogger implements Log, Serializable { diff --git a/src/java/org/apache/commons/logging/impl/NoOpLog.java b/src/java/org/apache/commons/logging/impl/NoOpLog.java index cbef4a7..9423f8e 100644 --- a/src/java/org/apache/commons/logging/impl/NoOpLog.java +++ b/src/java/org/apache/commons/logging/impl/NoOpLog.java @@ -28,7 +28,7 @@ import org.apache.commons.logging.Log; * * @author Scott Sanders * @author Rod Waldhoff - * @version $Id: NoOpLog.java,v 1.8 2004/06/06 21:13:12 rdonkin Exp $ + * @version $Id$ */ public class NoOpLog implements Log, Serializable { diff --git a/src/java/org/apache/commons/logging/impl/SimpleLog.java b/src/java/org/apache/commons/logging/impl/SimpleLog.java index 426b6f2..843f768 100644 --- a/src/java/org/apache/commons/logging/impl/SimpleLog.java +++ b/src/java/org/apache/commons/logging/impl/SimpleLog.java @@ -70,7 +70,7 @@ import org.apache.commons.logging.LogConfigurationException; * @author Rod Waldhoff * @author Robert Burrell Donkin * - * @version $Id: SimpleLog.java,v 1.21 2004/06/06 20:47:56 rdonkin Exp $ + * @version $Id$ */ public class SimpleLog implements Log, Serializable { diff --git a/src/test/org/apache/commons/logging/AbstractLogTest.java b/src/test/org/apache/commons/logging/AbstractLogTest.java index 4ae2b49..fe4acf4 100644 --- a/src/test/org/apache/commons/logging/AbstractLogTest.java +++ b/src/test/org/apache/commons/logging/AbstractLogTest.java @@ -23,7 +23,7 @@ import junit.framework.*; /** * * @author Sean C. Sullivan - * @version $Revision: $ + * @version $Revision$ * */ public abstract class AbstractLogTest extends TestCase { diff --git a/src/test/org/apache/commons/logging/LoadTest.java b/src/test/org/apache/commons/logging/LoadTest.java index fb8879e..6c92cd2 100644 --- a/src/test/org/apache/commons/logging/LoadTest.java +++ b/src/test/org/apache/commons/logging/LoadTest.java @@ -22,7 +22,7 @@ import junit.framework.TestSuite; /** * testcase to emulate container and application isolated from container * @author baliuka - * @version $Id: LoadTest.java,v 1.5 2004/02/28 21:46:45 craigmcc Exp $ + * @version $Id$ */ public class LoadTest extends TestCase{ //TODO: need some way to add service provider packages diff --git a/src/test/org/apache/commons/logging/TestAll.java b/src/test/org/apache/commons/logging/TestAll.java index 34a1adc..d83520f 100644 --- a/src/test/org/apache/commons/logging/TestAll.java +++ b/src/test/org/apache/commons/logging/TestAll.java @@ -29,7 +29,7 @@ import junit.framework.*; * coded by James Strachan. * * @author Robert Burrell Donkin - * @version $Revision: 1.7 $ + * @version $Revision$ */ public class TestAll extends TestCase { diff --git a/src/test/org/apache/commons/logging/Wrapper.java b/src/test/org/apache/commons/logging/Wrapper.java index efdfeb5..9818271 100644 --- a/src/test/org/apache/commons/logging/Wrapper.java +++ b/src/test/org/apache/commons/logging/Wrapper.java @@ -65,7 +65,7 @@ import java.util.List; * only the wrapper class itself. * * @author Craig R. McClanahan - * @version $Revision: 1.5 $ $Date: 2004/02/28 21:46:45 $ + * @version $Revision$ $Date$ */ public class Wrapper { diff --git a/src/test/org/apache/commons/logging/avalon/AvalonLoggerTest.java b/src/test/org/apache/commons/logging/avalon/AvalonLoggerTest.java index 98691ae..8f61e0d 100644 --- a/src/test/org/apache/commons/logging/avalon/AvalonLoggerTest.java +++ b/src/test/org/apache/commons/logging/avalon/AvalonLoggerTest.java @@ -25,7 +25,7 @@ import junit.framework.TestSuite; /** * @author Neeme Praks - * @version $Revision: 1.4 $ $Date: 2004/02/28 21:46:45 $ + * @version $Revision$ $Date$ */ public class AvalonLoggerTest extends AbstractLogTest { diff --git a/src/test/org/apache/commons/logging/jdk14/CustomConfigTestCase.java b/src/test/org/apache/commons/logging/jdk14/CustomConfigTestCase.java index ebf81d5..e91a74d 100644 --- a/src/test/org/apache/commons/logging/jdk14/CustomConfigTestCase.java +++ b/src/test/org/apache/commons/logging/jdk14/CustomConfigTestCase.java @@ -35,7 +35,7 @@ import junit.framework.TestSuite; * logger configured per the configuration properties. * * @author Craig R. McClanahan - * @version $Revision: 1.9 $ $Date: 2004/02/28 21:46:45 $ + * @version $Revision$ $Date$ */ public class CustomConfigTestCase extends DefaultConfigTestCase { diff --git a/src/test/org/apache/commons/logging/jdk14/DefaultConfigTestCase.java b/src/test/org/apache/commons/logging/jdk14/DefaultConfigTestCase.java index fb88ae0..55bacc4 100644 --- a/src/test/org/apache/commons/logging/jdk14/DefaultConfigTestCase.java +++ b/src/test/org/apache/commons/logging/jdk14/DefaultConfigTestCase.java @@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory; * should be automatically configured. * * @author Craig R. McClanahan - * @version $Revision: 1.8 $ $Date: 2004/02/28 21:46:45 $ + * @version $Revision$ $Date$ */ public class DefaultConfigTestCase extends TestCase { diff --git a/src/test/org/apache/commons/logging/jdk14/TestHandler.java b/src/test/org/apache/commons/logging/jdk14/TestHandler.java index a9f27b3..e7b0e51 100644 --- a/src/test/org/apache/commons/logging/jdk14/TestHandler.java +++ b/src/test/org/apache/commons/logging/jdk14/TestHandler.java @@ -27,7 +27,7 @@ import java.util.logging.LogRecord; *Test implementation of java.util.logging.Handler.
Test implementation of org.apache.log4j.Appender.