All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kieker.common.logging.LogImplSLF4JLogging Maven / Gradle / Ivy

/***************************************************************************
 * Copyright 2013 Kieker Project (http://kieker-monitoring.net)
 *
 * Licensed 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 kieker.common.logging;

/**
 * 
 * This is an actual implementation of the logging interface used by SLF4J logger.
 * 
 * @author Jan Waller
 * 
 * @since 1.6
 */
public class LogImplSLF4JLogging implements Log {

	private final org.slf4j.Logger log;

	/**
	 * Creates a new instance of this class.
	 * 
	 * @param name
	 *            The name of the logger.
	 */
	public LogImplSLF4JLogging(final String name) {
		this.log = org.slf4j.LoggerFactory.getLogger(name);
	}

	/**
	 * {@inheritDoc}
	 */
	public boolean isDebugEnabled() {
		return this.log.isDebugEnabled();
	}

	/**
	 * {@inheritDoc}
	 */
	public void debug(final String message) {
		this.log.debug(message);
	}

	/**
	 * {@inheritDoc}
	 */
	public void debug(final String message, final Throwable t) {
		this.log.debug(message, t);
	}

	/**
	 * {@inheritDoc}
	 */
	public void info(final String message) {
		this.log.info(message);
	}

	/**
	 * {@inheritDoc}
	 */
	public void info(final String message, final Throwable t) {
		this.log.info(message, t);
	}

	/**
	 * {@inheritDoc}
	 */
	public void warn(final String message) {
		this.log.warn(message);
	}

	/**
	 * {@inheritDoc}
	 */
	public void warn(final String message, final Throwable t) {
		this.log.warn(message, t);
	}

	/**
	 * {@inheritDoc}
	 */
	public void error(final String message) {
		this.log.error(message);
	}

	/**
	 * {@inheritDoc}
	 */
	public void error(final String message, final Throwable t) {
		this.log.error(message, t);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy