portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r649019 - /portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/util/CommonsToolsLogger.java
Date Thu, 17 Apr 2008 09:26:42 GMT
Author: ate
Date: Thu Apr 17 02:26:38 2008
New Revision: 649019

URL: http://svn.apache.org/viewvc?rev=649019&view=rev
Log:
ToolsLogger wrapper of a Commons Log

Added:
    portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/util/CommonsToolsLogger.java
  (with props)

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/util/CommonsToolsLogger.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/util/CommonsToolsLogger.java?rev=649019&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/util/CommonsToolsLogger.java
(added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/util/CommonsToolsLogger.java
Thu Apr 17 02:26:38 2008
@@ -0,0 +1,166 @@
+/*
+ * 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.jetspeed.components.util;
+
+import org.apache.commons.logging.Log;
+import org.apache.jetspeed.tools.ToolsLogger;
+
+/**
+ * ToolsLogger wrapper of a Commons Log
+ * 
+ * @version $Id$
+ *
+ */
+public class CommonsToolsLogger implements ToolsLogger
+{
+    private Log log;
+    
+    public CommonsToolsLogger(Log log)
+    {
+        this.log = log;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#debug(java.lang.CharSequence)
+     */
+    public void debug(CharSequence content)
+    {
+        log.debug(content);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#debug(java.lang.CharSequence, java.lang.Throwable)
+     */
+    public void debug(CharSequence content, Throwable error)
+    {
+        log.debug(content, error);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#debug(java.lang.Throwable)
+     */
+    public void debug(Throwable error)
+    {
+        log.debug(error);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#error(java.lang.CharSequence)
+     */
+    public void error(CharSequence content)
+    {
+        log.error(content);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#error(java.lang.CharSequence, java.lang.Throwable)
+     */
+    public void error(CharSequence content, Throwable error)
+    {
+        log.error(content,error);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#error(java.lang.Throwable)
+     */
+    public void error(Throwable error)
+    {
+        log.error(error);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#info(java.lang.CharSequence)
+     */
+    public void info(CharSequence content)
+    {
+        log.info(content);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#info(java.lang.CharSequence, java.lang.Throwable)
+     */
+    public void info(CharSequence content, Throwable error)
+    {
+        log.info(content,error);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#info(java.lang.Throwable)
+     */
+    public void info(Throwable error)
+    {
+        log.info(error);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#isDebugEnabled()
+     */
+    public boolean isDebugEnabled()
+    {
+        return log.isDebugEnabled() || log.isTraceEnabled();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#isErrorEnabled()
+     */
+    public boolean isErrorEnabled()
+    {
+        return log.isErrorEnabled() || log.isFatalEnabled();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#isInfoEnabled()
+     */
+    public boolean isInfoEnabled()
+    {
+        return log.isInfoEnabled();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#isWarnEnabled()
+     */
+    public boolean isWarnEnabled()
+    {
+        return log.isWarnEnabled();
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#warn(java.lang.CharSequence)
+     */
+    public void warn(CharSequence content)
+    {
+        log.warn(content);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#warn(java.lang.CharSequence, java.lang.Throwable)
+     */
+    public void warn(CharSequence content, Throwable error)
+    {
+        log.warn(content,error);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.tools.ToolsLogger#warn(java.lang.Throwable)
+     */
+    public void warn(Throwable error)
+    {
+        log.warn(error);
+    }
+
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/util/CommonsToolsLogger.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/util/CommonsToolsLogger.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-cm/src/main/java/org/apache/jetspeed/components/util/CommonsToolsLogger.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



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


Mime
View raw message