|
|
@@ -31,37 +31,37 @@ public class AdvLogger extends org.apache.log4j.Logger {
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
public void ftrace(String format, Object... args) {
|
|
|
- if( check(Level.TRACE) ) {
|
|
|
+ if( isEnabledFor(Level.TRACE) ) {
|
|
|
forcedLog(ADV_FQCN, Level.TRACE, Strings.sprintf(format, args), null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void fdebug(String format, Object... args) {
|
|
|
- if( check(Level.DEBUG) ) {
|
|
|
+ if( isEnabledFor(Level.DEBUG) ) {
|
|
|
forcedLog(ADV_FQCN, Level.DEBUG, Strings.sprintf(format, args), null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void finfo(String format, Object... args) {
|
|
|
- if( check(Level.INFO) ) {
|
|
|
+ if( isEnabledFor(Level.INFO) ) {
|
|
|
forcedLog(ADV_FQCN, Level.INFO, Strings.sprintf(format, args), null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void ferror(String format, Object... args) {
|
|
|
- if( check(Level.ERROR) ) {
|
|
|
+ if( isEnabledFor(Level.ERROR) ) {
|
|
|
forcedLog(ADV_FQCN, Level.ERROR, Strings.sprintf(format, args), null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void ffatal(String format, Object... args) {
|
|
|
- if( check(Level.FATAL) ) {
|
|
|
+ if( isEnabledFor(Level.FATAL) ) {
|
|
|
forcedLog(ADV_FQCN, Level.FATAL, Strings.sprintf(format, args), null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void fwarn(String format, Object... args) {
|
|
|
- if( check(Level.WARN) ) {
|
|
|
+ if( isEnabledFor(Level.WARN) ) {
|
|
|
forcedLog(ADV_FQCN, Level.WARN, Strings.sprintf(format, args), null);
|
|
|
}
|
|
|
}
|
|
|
@@ -69,37 +69,37 @@ public class AdvLogger extends org.apache.log4j.Logger {
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
public void xtrace(String format, Throwable cause, Object... args) {
|
|
|
- if( check(Level.TRACE) ) {
|
|
|
+ if( isEnabledFor(Level.TRACE) ) {
|
|
|
forcedLog(ADV_FQCN, Level.TRACE, Strings.sprintf(format, args), cause);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void xdebug(String format, Throwable cause, Object... args) {
|
|
|
- if( check(Level.DEBUG) ) {
|
|
|
+ if( isEnabledFor(Level.DEBUG) ) {
|
|
|
forcedLog(ADV_FQCN, Level.DEBUG, Strings.sprintf(format, args), cause);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void xinfo(String format, Throwable cause, Object... args) {
|
|
|
- if( check(Level.INFO) ) {
|
|
|
+ if( isEnabledFor(Level.INFO) ) {
|
|
|
forcedLog(ADV_FQCN, Level.INFO, Strings.sprintf(format, args), cause);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void xerror(String format, Throwable cause, Object... args) {
|
|
|
- if( check(Level.ERROR) ) {
|
|
|
+ if( isEnabledFor(Level.ERROR) ) {
|
|
|
forcedLog(ADV_FQCN, Level.ERROR, Strings.sprintf(format, args), cause);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void xfatal(String format, Throwable cause, Object... args) {
|
|
|
- if( check(Level.FATAL) ) {
|
|
|
+ if( isEnabledFor(Level.FATAL) ) {
|
|
|
forcedLog(ADV_FQCN, Level.FATAL, Strings.sprintf(format, args), cause);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void xwarn(String format, Throwable cause, Object... args) {
|
|
|
- if( check(Level.WARN) ) {
|
|
|
+ if( isEnabledFor(Level.WARN) ) {
|
|
|
forcedLog(ADV_FQCN, Level.WARN, Strings.sprintf(format, args), cause);
|
|
|
}
|
|
|
}
|
|
|
@@ -159,9 +159,9 @@ public class AdvLogger extends org.apache.log4j.Logger {
|
|
|
public void warn(Object message) {
|
|
|
logex(Level.WARN, message);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
private void logex(Level level, Object message) {
|
|
|
- if( check(level) ) {
|
|
|
+ if( isEnabledFor(level) ) {
|
|
|
if(message instanceof Throwable) {
|
|
|
forcedLog(ADV_FQCN, level, TEXT_FOR_EXCEPTION, (Throwable)message);
|
|
|
} else {
|
|
|
@@ -170,10 +170,6 @@ public class AdvLogger extends org.apache.log4j.Logger {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private boolean check(Level level) {
|
|
|
- return !repository.isDisabled(level.toInt()) && level.isGreaterOrEqual(getEffectiveLevel());
|
|
|
- }
|
|
|
-
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
public void trace() {
|