com.googlecode.kevinarpe.papaya.logging.slf4j.SLF4JForwardingLogger Maven / Gradle / Ivy
package com.googlecode.kevinarpe.papaya.logging.slf4j;
/*
* #%L
* This file is part of Papaya.
* %%
* Copyright (C) 2013 - 2014 Kevin Connor ARPE ([email protected])
* %%
* Papaya 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, either version 3 of the License, or
* (at your option) any later version.
*
* GPL Classpath Exception:
* This project is subject to the "Classpath" exception as provided in
* the LICENSE file that accompanied this code.
*
* Papaya 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 Papaya. If not, see .
* #L%
*/
import com.google.common.collect.ForwardingList;
import com.googlecode.kevinarpe.papaya.annotation.FullyTested;
import org.slf4j.Logger;
import org.slf4j.Marker;
/**
* A logger which forwards all its method calls to another logger. Similar to Google Guava's
* {@link ForwardingList}.
*
* Subclasses must only override a single method: {@link #delegate()}.
*
* @author Kevin Connor ARPE ([email protected])
*
* @see Logger
*/
@FullyTested
public abstract class SLF4JForwardingLogger
implements Logger {
protected SLF4JForwardingLogger() {
// Empty
}
/**
* @return backing delegate instance. Must not be {@code null}.
*/
protected abstract Logger delegate();
@Override
public String getName() {
return delegate().getName();
}
@Override
public boolean isTraceEnabled() {
return delegate().isTraceEnabled();
}
@Override
public void trace(String msg) {
delegate().trace(msg);
}
@Override
public void trace(String format, Object arg) {
delegate().trace(format, arg);
}
@Override
public void trace(String format, Object arg1, Object arg2) {
delegate().trace(format, arg1, arg2);
}
@Override
public void trace(String format, Object... arguments) {
delegate().trace(format, arguments);
}
@Override
public void trace(String msg, Throwable t) {
delegate().trace(msg, t);
}
@Override
public boolean isTraceEnabled(Marker marker) {
return delegate().isTraceEnabled(marker);
}
@Override
public void trace(Marker marker, String msg) {
delegate().trace(marker, msg);
}
@Override
public void trace(Marker marker, String format, Object arg) {
delegate().trace(marker, format, arg);
}
@Override
public void trace(Marker marker, String format, Object arg1, Object arg2) {
delegate().trace(marker, format, arg1, arg2);
}
@Override
public void trace(Marker marker, String format, Object... argArray) {
delegate().trace(marker, format, argArray);
}
@Override
public void trace(Marker marker, String msg, Throwable t) {
delegate().trace(marker, msg, t);
}
@Override
public boolean isDebugEnabled() {
return delegate().isDebugEnabled();
}
@Override
public void debug(String msg) {
delegate().debug(msg);
}
@Override
public void debug(String format, Object arg) {
delegate().debug(format, arg);
}
@Override
public void debug(String format, Object arg1, Object arg2) {
delegate().debug(format, arg1, arg2);
}
@Override
public void debug(String format, Object... arguments) {
delegate().debug(format, arguments);
}
@Override
public void debug(String msg, Throwable t) {
delegate().debug(msg, t);
}
@Override
public boolean isDebugEnabled(Marker marker) {
return delegate().isDebugEnabled(marker);
}
@Override
public void debug(Marker marker, String msg) {
delegate().debug(marker, msg);
}
@Override
public void debug(Marker marker, String format, Object arg) {
delegate().debug(marker, format, arg);
}
@Override
public void debug(Marker marker, String format, Object arg1, Object arg2) {
delegate().debug(marker, format, arg1, arg2);
}
@Override
public void debug(Marker marker, String format, Object... arguments) {
delegate().debug(marker, format, arguments);
}
@Override
public void debug(Marker marker, String msg, Throwable t) {
delegate().debug(marker, msg, t);
}
@Override
public boolean isInfoEnabled() {
return delegate().isInfoEnabled();
}
@Override
public void info(String msg) {
delegate().info(msg);
}
@Override
public void info(String format, Object arg) {
delegate().info(format, arg);
}
@Override
public void info(String format, Object arg1, Object arg2) {
delegate().info(format, arg1, arg2);
}
@Override
public void info(String format, Object... arguments) {
delegate().info(format, arguments);
}
@Override
public void info(String msg, Throwable t) {
delegate().info(msg, t);
}
@Override
public boolean isInfoEnabled(Marker marker) {
return delegate().isInfoEnabled(marker);
}
@Override
public void info(Marker marker, String msg) {
delegate().info(marker, msg);
}
@Override
public void info(Marker marker, String format, Object arg) {
delegate().info(marker, format, arg);
}
@Override
public void info(Marker marker, String format, Object arg1, Object arg2) {
delegate().info(marker, format, arg1, arg2);
}
@Override
public void info(Marker marker, String format, Object... arguments) {
delegate().info(marker, format, arguments);
}
@Override
public void info(Marker marker, String msg, Throwable t) {
delegate().info(marker, msg, t);
}
@Override
public boolean isWarnEnabled() {
return delegate().isWarnEnabled();
}
@Override
public void warn(String msg) {
delegate().warn(msg);
}
@Override
public void warn(String format, Object arg) {
delegate().warn(format, arg);
}
@Override
public void warn(String format, Object... arguments) {
delegate().warn(format, arguments);
}
@Override
public void warn(String format, Object arg1, Object arg2) {
delegate().warn(format, arg1, arg2);
}
@Override
public void warn(String msg, Throwable t) {
delegate().warn(msg, t);
}
@Override
public boolean isWarnEnabled(Marker marker) {
return delegate().isWarnEnabled(marker);
}
@Override
public void warn(Marker marker, String msg) {
delegate().warn(marker, msg);
}
@Override
public void warn(Marker marker, String format, Object arg) {
delegate().warn(marker, format, arg);
}
@Override
public void warn(Marker marker, String format, Object arg1, Object arg2) {
delegate().warn(marker, format, arg1, arg2);
}
@Override
public void warn(Marker marker, String format, Object... arguments) {
delegate().warn(marker, format, arguments);
}
@Override
public void warn(Marker marker, String msg, Throwable t) {
delegate().warn(marker, msg, t);
}
@Override
public boolean isErrorEnabled() {
return delegate().isErrorEnabled();
}
@Override
public void error(String msg) {
delegate().error(msg);
}
@Override
public void error(String format, Object arg) {
delegate().error(format, arg);
}
@Override
public void error(String format, Object arg1, Object arg2) {
delegate().error(format, arg1, arg2);
}
@Override
public void error(String format, Object... arguments) {
delegate().error(format, arguments);
}
@Override
public void error(String msg, Throwable t) {
delegate().error(msg, t);
}
@Override
public boolean isErrorEnabled(Marker marker) {
return delegate().isErrorEnabled(marker);
}
@Override
public void error(Marker marker, String msg) {
delegate().error(marker, msg);
}
@Override
public void error(Marker marker, String format, Object arg) {
delegate().error(marker, format, arg);
}
@Override
public void error(Marker marker, String format, Object arg1, Object arg2) {
delegate().error(marker, format, arg1, arg2);
}
@Override
public void error(Marker marker, String format, Object... arguments) {
delegate().error(marker, format, arguments);
}
@Override
public void error(Marker marker, String msg, Throwable t) {
delegate().error(marker, msg, t);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy