You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jo...@apache.org on 2007/01/07 00:25:31 UTC

svn commit: r493594 - in /jakarta/commons/proper/transaction/trunk: RELEASE-NOTES.txt lib/commons-logging-1.1.jar src/java/org/apache/commons/transaction/util/CommonsLoggingLogger.java

Author: joerg
Date: Sat Jan  6 15:25:25 2007
New Revision: 493594

URL: http://svn.apache.org/viewvc?view=rev&rev=493594
Log:
Added LoggerFacade implementation for Jakarta Commons Logging

Added:
    jakarta/commons/proper/transaction/trunk/lib/commons-logging-1.1.jar   (with props)
    jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/CommonsLoggingLogger.java   (with props)
Modified:
    jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt

Modified: jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt?view=diff&rev=493594&r1=493593&r2=493594
==============================================================================
--- jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt (original)
+++ jakarta/commons/proper/transaction/trunk/RELEASE-NOTES.txt Sat Jan  6 15:25:25 2007
@@ -28,6 +28,7 @@
 - Better error reporting in FileHelper when destination directories (moveRec) or files (copyRec) could not be created
 - Added functions to FileResourceManager for copying and moving resources.
 - Added possibility to append to (instead of overwriting) an existing resource with writeResource in FileResourceManager.
+- Added LoggerFacade implementation for Jakarta Commons Logging
 
 BUGFIXES FROM 1.1
 -----------------

Added: jakarta/commons/proper/transaction/trunk/lib/commons-logging-1.1.jar
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/lib/commons-logging-1.1.jar?view=auto&rev=493594
==============================================================================
Binary file - no diff available.

Propchange: jakarta/commons/proper/transaction/trunk/lib/commons-logging-1.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/CommonsLoggingLogger.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/CommonsLoggingLogger.java?view=auto&rev=493594
==============================================================================
--- jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/CommonsLoggingLogger.java (added)
+++ jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/CommonsLoggingLogger.java Sat Jan  6 15:25:25 2007
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.transaction.util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * @version $Id$
+ */
+public class CommonsLoggingLogger implements LoggerFacade {
+
+    private final Log log;
+
+    public CommonsLoggingLogger(final Log log) {
+        this.log = log;
+    }
+
+    public LoggerFacade createLogger(final String name) {
+        return new CommonsLoggingLogger(LogFactory.getLog(name));
+    }
+
+    public void logInfo(final String message) {
+    	this.log.info(message);
+    }
+
+    public void logFine(final String message) {
+    	this.log.debug(message);
+    }
+
+    public boolean isFineEnabled() {
+        return this.log.isDebugEnabled();
+    }
+
+    public void logFiner(final String message) {
+    	this.log.debug(message);
+    }
+
+    public boolean isFinerEnabled() {
+        return this.log.isDebugEnabled();
+    }
+
+    public void logFinest(final String message) {
+    	this.log.trace(message);
+    }
+
+    public boolean isFinestEnabled() {
+        return this.log.isTraceEnabled();
+    }
+
+    public void logWarning(final String message) {
+    	this.log.warn(message);
+    }
+
+    public void logWarning(final String message, final Throwable t) {
+    	this.log.warn(message, t);
+    }
+
+    public void logSevere(final String message) {
+    	this.log.error(message);
+    }
+
+    public void logSevere(final String message, final Throwable t) {
+    	this.log.error(message, t);
+    }
+
+}

Propchange: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/CommonsLoggingLogger.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org