Logo Search packages:      
Sourcecode: mysql-connector-java version File versions  Download package

Slf4JLogger.java

/*
 Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 

  The MySQL Connector/J is licensed under the terms of the GPLv2
  <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most MySQL Connectors.
  There are special exceptions to the terms and conditions of the GPLv2 as it is applied to
  this software, see the FLOSS License Exception
  <http://www.mysql.com/about/legal/licensing/foss-exception.html>.

  This program is free software; you can redistribute it and/or modify it under the terms
  of the GNU General Public License as published by the Free Software Foundation; version 2
  of the License.

  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with this
  program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth
  Floor, Boston, MA 02110-1301  USA



 */

package com.mysql.jdbc.log;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

00032 public class Slf4JLogger implements Log {
      private Logger log;
      
      public Slf4JLogger(String name) {
            log = LoggerFactory.getLogger(name);
      }
      
00039       public boolean isDebugEnabled() {
            return log.isDebugEnabled();
      }

00043       public boolean isErrorEnabled() {
            return log.isErrorEnabled();
      }

00047       public boolean isFatalEnabled() {
            return log.isErrorEnabled();
      }

00051       public boolean isInfoEnabled() {
            return log.isInfoEnabled();
      }

00055       public boolean isTraceEnabled() {
            return log.isTraceEnabled();
      }

00059       public boolean isWarnEnabled() {
            return log.isWarnEnabled();
      }

00063       public void logDebug(Object msg) {
            log.debug(msg.toString());
      }

00067       public void logDebug(Object msg, Throwable thrown) {
            log.debug(msg.toString(), thrown);
      }

00071       public void logError(Object msg) {
            log.error(msg.toString());
      }

00075       public void logError(Object msg, Throwable thrown) {
            log.error(msg.toString(), thrown);
      }

00079       public void logFatal(Object msg) {
            log.error(msg.toString());
      }

00083       public void logFatal(Object msg, Throwable thrown) {
            log.error(msg.toString(), thrown);
      }

00087       public void logInfo(Object msg) {
            log.info(msg.toString());
      }

00091       public void logInfo(Object msg, Throwable thrown) {
            log.info(msg.toString(), thrown);
      }

00095       public void logTrace(Object msg) {
            log.trace(msg.toString());
      }

00099       public void logTrace(Object msg, Throwable thrown) {
            log.trace(msg.toString(), thrown);
      }

00103       public void logWarn(Object msg) {
            log.warn(msg.toString());
      }

00107       public void logWarn(Object msg, Throwable thrown) {
            log.warn(msg.toString(), thrown);
      }

}

Generated by  Doxygen 1.6.0   Back to index