CPD Results
The following document contains the results of PMD's CPD 7.3.0.
Duplications
File |
Line |
org/apache/commons/logging/impl/Jdk13LumberjackLogger.java |
184 |
org/apache/commons/logging/impl/Jdk14Logger.java |
131 |
}
/**
* Gets the native Logger instance we are using.
*
* @return the native Logger instance we are using.
*/
public Logger getLogger() {
if (logger == null) {
logger = Logger.getLogger(name);
}
return logger;
}
/**
* Logs a message with {@link java.util.logging.Level#INFO}.
*
* @param message to log
* @see org.apache.commons.logging.Log#info(Object)
*/
@Override
public void info(final Object message) {
log(Level.INFO, String.valueOf(message), null);
}
/**
* Logs a message with {@link java.util.logging.Level#INFO}.
*
* @param message to log
* @param exception log this cause
* @see org.apache.commons.logging.Log#info(Object, Throwable)
*/
@Override
public void info(final Object message, final Throwable exception) {
log(Level.INFO, String.valueOf(message), exception);
}
/**
* Is debug logging currently enabled?
*/
@Override
public boolean isDebugEnabled() {
return getLogger().isLoggable(Level.FINE);
}
/**
* Is error logging currently enabled?
*/
@Override
public boolean isErrorEnabled() {
return getLogger().isLoggable(Level.SEVERE);
}
/**
* Is fatal logging currently enabled?
*/
@Override
public boolean isFatalEnabled() {
return getLogger().isLoggable(Level.SEVERE);
}
/**
* Is info logging currently enabled?
*/
@Override
public boolean isInfoEnabled() {
return getLogger().isLoggable(Level.INFO);
}
/**
* Is trace logging currently enabled?
*/
@Override
public boolean isTraceEnabled() {
return getLogger().isLoggable(Level.FINEST);
}
/**
* Is warn logging currently enabled?
*/
@Override
public boolean isWarnEnabled() {
return getLogger().isLoggable(Level.WARNING);
} |
File |
Line |
org/apache/commons/logging/impl/Jdk13LumberjackLogger.java |
79 |
org/apache/commons/logging/impl/Jdk14Logger.java |
59 |
public Jdk13LumberjackLogger(final String name) {
this.name = name;
logger = getLogger();
}
/**
* Logs a message with {@link java.util.logging.Level#FINE}.
*
* @param message to log
* @see org.apache.commons.logging.Log#debug(Object)
*/
@Override
public void debug(final Object message) {
log(Level.FINE, String.valueOf(message), null);
}
/**
* Logs a message with {@link java.util.logging.Level#FINE}.
*
* @param message to log
* @param exception log this cause
* @see org.apache.commons.logging.Log#debug(Object, Throwable)
*/
@Override
public void debug(final Object message, final Throwable exception) {
log(Level.FINE, String.valueOf(message), exception);
}
/**
* Logs a message with {@link java.util.logging.Level#SEVERE}.
*
* @param message to log
* @see org.apache.commons.logging.Log#error(Object)
*/
@Override
public void error(final Object message) {
log(Level.SEVERE, String.valueOf(message), null);
}
/**
* Logs a message with {@link java.util.logging.Level#SEVERE}.
*
* @param message to log
* @param exception log this cause
* @see org.apache.commons.logging.Log#error(Object, Throwable)
*/
@Override
public void error(final Object message, final Throwable exception) {
log(Level.SEVERE, String.valueOf(message), exception);
}
/**
* Logs a message with {@link java.util.logging.Level#SEVERE}.
*
* @param message to log
* @see org.apache.commons.logging.Log#fatal(Object)
*/
@Override
public void fatal(final Object message) {
log(Level.SEVERE, String.valueOf(message), null);
}
/**
* Logs a message with {@link java.util.logging.Level#SEVERE}.
*
* @param message to log
* @param exception log this cause
* @see org.apache.commons.logging.Log#fatal(Object, Throwable)
*/
@Override
public void fatal(final Object message, final Throwable exception) {
log(Level.SEVERE, String.valueOf(message), exception);
} |
File |
Line |
org/apache/commons/logging/impl/AvalonLogger.java |
206 |
org/apache/commons/logging/impl/LogKitLogger.java |
182 |
if (getLogger().isInfoEnabled()) {
getLogger().info(String.valueOf(message), t);
}
}
/**
* Is logging to {@code org.apache.avalon.framework.logger.Logger.debug} enabled?
* @see org.apache.commons.logging.Log#isDebugEnabled()
*/
@Override
public boolean isDebugEnabled() {
return getLogger().isDebugEnabled();
}
/**
* Is logging to {@code org.apache.avalon.framework.logger.Logger.error} enabled?
* @see org.apache.commons.logging.Log#isErrorEnabled()
*/
@Override
public boolean isErrorEnabled() {
return getLogger().isErrorEnabled();
}
/**
* Is logging to {@code org.apache.avalon.framework.logger.Logger.fatalError} enabled?
* @see org.apache.commons.logging.Log#isFatalEnabled()
*/
@Override
public boolean isFatalEnabled() {
return getLogger().isFatalErrorEnabled();
}
/**
* Is logging to {@code org.apache.avalon.framework.logger.Logger.info} enabled?
* @see org.apache.commons.logging.Log#isInfoEnabled()
*/
@Override
public boolean isInfoEnabled() {
return getLogger().isInfoEnabled();
}
/**
* Is logging to {@code org.apache.avalon.framework.logger.Logger.debug} enabled?
* @see org.apache.commons.logging.Log#isTraceEnabled()
*/
@Override
public boolean isTraceEnabled() {
return getLogger().isDebugEnabled();
}
/**
* Is logging to {@code org.apache.avalon.framework.logger.Logger.warn} enabled?
* @see org.apache.commons.logging.Log#isWarnEnabled()
*/
@Override
public boolean isWarnEnabled() {
return getLogger().isWarnEnabled();
}
/**
* Logs a message with {@code org.apache.avalon.framework.logger.Logger.debug}.
*
* @param message to log
* @see org.apache.commons.logging.Log#trace(Object)
*/
@Override
public void trace(final Object message) { |
File |
Line |
org/apache/commons/logging/impl/Jdk13LumberjackLogger.java |
281 |
org/apache/commons/logging/impl/Jdk14Logger.java |
241 |
}
}
/**
* Logs a message with {@link java.util.logging.Level#FINEST}.
*
* @param message to log
* @see org.apache.commons.logging.Log#trace(Object)
*/
@Override
public void trace(final Object message) {
log(Level.FINEST, String.valueOf(message), null);
}
/**
* Logs a message with {@link java.util.logging.Level#FINEST}.
*
* @param message to log
* @param exception log this cause
* @see org.apache.commons.logging.Log#trace(Object, Throwable)
*/
@Override
public void trace(final Object message, final Throwable exception) {
log(Level.FINEST, String.valueOf(message), exception);
}
/**
* Logs a message with {@link java.util.logging.Level#WARNING}.
*
* @param message to log
* @see org.apache.commons.logging.Log#warn(Object)
*/
@Override
public void warn(final Object message) {
log(Level.WARNING, String.valueOf(message), null);
}
/**
* Logs a message with {@link java.util.logging.Level#WARNING}.
*
* @param message to log
* @param exception log this cause
* @see org.apache.commons.logging.Log#warn(Object, Throwable)
*/
@Override
public void warn(final Object message, final Throwable exception) {
log(Level.WARNING, String.valueOf(message), exception);
}
} |
|