io.github.xtazxz.base.common.log.SecurityLogger Maven / Gradle / Ivy
The newest version!
package io.github.xtazxz.base.common.log;
import io.github.xtazxz.base.common.utils.NormalizeSpaceUtils;
import org.slf4j.Logger;
import org.slf4j.Marker;
public class SecurityLogger implements Logger {
private final Logger target;
public SecurityLogger(Logger logger) {
this.target = logger;
}
@Override
public String getName() {
return this.target.getName();
}
@Override
public boolean isTraceEnabled() {
return this.target.isTraceEnabled();
}
@Override
public boolean isTraceEnabled(Marker marker) {
return this.target.isTraceEnabled(marker);
}
@Override
public void trace(String msg) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.trace(newMsg);
}
@Override
public void trace(String format, Object arg) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg = NormalizeSpaceUtils.normalizeSpace(arg);
this.target.trace(newFormat, newArg);
}
@Override
public void trace(String format, Object arg1, Object arg2) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg1 = NormalizeSpaceUtils.normalizeSpace(arg1);
Object newArg2 = NormalizeSpaceUtils.normalizeSpace(arg2);
this.target.trace(newFormat, newArg1, newArg2);
}
@Override
public void trace(String format, Object... arguments) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object[] newArguments = NormalizeSpaceUtils.normalizeSpace(arguments);
this.target.trace(newFormat, newArguments);
}
@Override
public void trace(String msg, Throwable t) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.trace(newMsg, t);
}
@Override
public void trace(Marker marker, String msg) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.trace(marker, newMsg);
}
@Override
public void trace(Marker marker, String format, Object arg) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg = NormalizeSpaceUtils.normalizeSpace(arg);
this.target.trace(marker, newFormat, newArg);
}
@Override
public void trace(Marker marker, String format, Object arg1, Object arg2) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg1 = NormalizeSpaceUtils.normalizeSpace(arg1);
Object newArg2 = NormalizeSpaceUtils.normalizeSpace(arg2);
this.target.trace(marker, newFormat, newArg1, newArg2);
}
@Override
public void trace(Marker marker, String format, Object... argArray) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object[] newArgArray = NormalizeSpaceUtils.normalizeSpace(argArray);
this.target.trace(marker, newFormat, newArgArray);
}
@Override
public void trace(Marker marker, String msg, Throwable t) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.trace(marker, newMsg, t);
}
@Override
public boolean isDebugEnabled() {
return this.target.isDebugEnabled();
}
@Override
public boolean isDebugEnabled(Marker marker) {
return this.target.isDebugEnabled(marker);
}
@Override
public void debug(String msg) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.debug(newMsg);
}
@Override
public void debug(String format, Object arg) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg = NormalizeSpaceUtils.normalizeSpace(arg);
this.target.debug(newFormat, newArg);
}
@Override
public void debug(String format, Object arg1, Object arg2) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg1 = NormalizeSpaceUtils.normalizeSpace(arg1);
Object newArg2 = NormalizeSpaceUtils.normalizeSpace(arg2);
this.target.debug(newFormat, newArg1, newArg2);
}
@Override
public void debug(String format, Object... arguments) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object[] newArguments = NormalizeSpaceUtils.normalizeSpace(arguments);
this.target.debug(newFormat, newArguments);
}
@Override
public void debug(String msg, Throwable t) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.debug(newMsg, t);
}
@Override
public void debug(Marker marker, String msg) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.debug(marker, newMsg);
}
@Override
public void debug(Marker marker, String format, Object arg) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg = NormalizeSpaceUtils.normalizeSpace(arg);
this.target.debug(marker, newFormat, newArg);
}
@Override
public void debug(Marker marker, String format, Object arg1, Object arg2) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg1 = NormalizeSpaceUtils.normalizeSpace(arg1);
Object newArg2 = NormalizeSpaceUtils.normalizeSpace(arg2);
this.target.debug(marker, newFormat, newArg1, newArg2);
}
@Override
public void debug(Marker marker, String format, Object... arguments) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object[] newArguments = NormalizeSpaceUtils.normalizeSpace(arguments);
this.target.debug(marker, newFormat, newArguments);
}
@Override
public void debug(Marker marker, String msg, Throwable t) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.debug(marker, newMsg, t);
}
@Override
public boolean isInfoEnabled() {
return this.target.isInfoEnabled();
}
@Override
public boolean isInfoEnabled(Marker marker) {
return this.target.isInfoEnabled(marker);
}
@Override
public void info(String msg) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.info(newMsg);
}
@Override
public void info(String format, Object arg) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg = NormalizeSpaceUtils.normalizeSpace(arg);
this.target.info(newFormat, newArg);
}
@Override
public void info(String format, Object arg1, Object arg2) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg1 = NormalizeSpaceUtils.normalizeSpace(arg1);
Object newArg2 = NormalizeSpaceUtils.normalizeSpace(arg2);
this.target.info(newFormat, newArg1, newArg2);
}
@Override
public void info(String format, Object... arguments) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object[] newArguments = NormalizeSpaceUtils.normalizeSpace(arguments);
this.target.info(newFormat, newArguments);
}
@Override
public void info(String msg, Throwable t) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.info(newMsg, t);
}
@Override
public void info(Marker marker, String msg) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.info(marker, newMsg);
}
@Override
public void info(Marker marker, String format, Object arg) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg = NormalizeSpaceUtils.normalizeSpace(arg);
this.target.info(marker, newFormat, newArg);
}
@Override
public void info(Marker marker, String format, Object arg1, Object arg2) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg1 = NormalizeSpaceUtils.normalizeSpace(arg1);
Object newArg2 = NormalizeSpaceUtils.normalizeSpace(arg2);
this.target.info(marker, newFormat, newArg1, newArg2);
}
@Override
public void info(Marker marker, String format, Object... arguments) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object[] newArguments = NormalizeSpaceUtils.normalizeSpace(arguments);
this.target.info(marker, newFormat, newArguments);
}
@Override
public void info(Marker marker, String msg, Throwable t) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.info(marker, newMsg, t);
}
@Override
public boolean isWarnEnabled() {
return this.target.isWarnEnabled();
}
@Override
public boolean isWarnEnabled(Marker marker) {
return this.target.isWarnEnabled(marker);
}
@Override
public void warn(String msg) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.warn(newMsg);
}
@Override
public void warn(String format, Object arg) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg = NormalizeSpaceUtils.normalizeSpace(arg);
this.target.warn(newFormat, newArg);
}
@Override
public void warn(String format, Object... arguments) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object[] newArguments = NormalizeSpaceUtils.normalizeSpace(arguments);
this.target.warn(newFormat, newArguments);
}
@Override
public void warn(String format, Object arg1, Object arg2) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg1 = NormalizeSpaceUtils.normalizeSpace(arg1);
Object newArg2 = NormalizeSpaceUtils.normalizeSpace(arg2);
this.target.warn(newFormat, newArg1, newArg2);
}
@Override
public void warn(String msg, Throwable t) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.warn(newMsg, t);
}
@Override
public void warn(Marker marker, String msg) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.warn(marker, newMsg);
}
@Override
public void warn(Marker marker, String format, Object arg) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg = NormalizeSpaceUtils.normalizeSpace(arg);
this.target.warn(marker, newFormat, newArg);
}
@Override
public void warn(Marker marker, String format, Object arg1, Object arg2) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg1 = NormalizeSpaceUtils.normalizeSpace(arg1);
Object newArg2 = NormalizeSpaceUtils.normalizeSpace(arg2);
this.target.warn(marker, newFormat, newArg1, newArg2);
}
@Override
public void warn(Marker marker, String format, Object... arguments) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object[] newArguments = NormalizeSpaceUtils.normalizeSpace(arguments);
this.target.warn(marker, newFormat, newArguments);
}
@Override
public void warn(Marker marker, String msg, Throwable t) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.warn(marker, newMsg, t);
}
@Override
public boolean isErrorEnabled() {
return this.target.isErrorEnabled();
}
@Override
public boolean isErrorEnabled(Marker marker) {
return this.target.isErrorEnabled(marker);
}
@Override
public void error(String msg) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.error(newMsg);
}
@Override
public void error(String format, Object arg) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg = NormalizeSpaceUtils.normalizeSpace(arg);
this.target.error(newFormat, newArg);
}
@Override
public void error(String format, Object arg1, Object arg2) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg1 = NormalizeSpaceUtils.normalizeSpace(arg1);
Object newArg2 = NormalizeSpaceUtils.normalizeSpace(arg2);
this.target.error(newFormat, newArg1, newArg2);
}
@Override
public void error(String format, Object... arguments) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object[] newArguments = NormalizeSpaceUtils.normalizeSpace(arguments);
this.target.error(newFormat, newArguments);
}
@Override
public void error(String msg, Throwable t) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.error(newMsg, t);
}
@Override
public void error(Marker marker, String msg) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.error(marker, newMsg);
}
@Override
public void error(Marker marker, String format, Object arg) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg = NormalizeSpaceUtils.normalizeSpace(arg);
this.target.error(marker, newFormat, newArg);
}
@Override
public void error(Marker marker, String format, Object arg1, Object arg2) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object newArg1 = NormalizeSpaceUtils.normalizeSpace(arg1);
Object newArg2 = NormalizeSpaceUtils.normalizeSpace(arg2);
this.target.error(marker, newFormat, newArg1, newArg2);
}
@Override
public void error(Marker marker, String format, Object... arguments) {
String newFormat = NormalizeSpaceUtils.normalizeSpace(format);
Object[] newArguments = NormalizeSpaceUtils.normalizeSpace(arguments);
this.target.error(marker, newFormat, newArguments);
}
@Override
public void error(Marker marker, String msg, Throwable t) {
String newMsg = NormalizeSpaceUtils.normalizeSpace(msg);
this.target.error(marker, newMsg, t);
}
}