Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/src/main/java/feign/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ protected Response logAndRebufferResponse(String configKey, Level logLevel, Resp

@Override
protected void log(String configKey, String format, Object... args) {
logger.fine(String.format(methodTag(configKey) + format, args));
if (logger.isLoggable(java.util.logging.Level.FINE)) {
logger.fine(String.format(methodTag(configKey) + format, args));
}
}

/**
Expand Down
4 changes: 3 additions & 1 deletion slf4j/src/main/java/feign/slf4j/Slf4jLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ protected Response logAndRebufferResponse(String configKey, Level logLevel, Resp
protected void log(String configKey, String format, Object... args) {
// Not using SLF4J's support for parameterized messages (even though it would be more efficient) because it would
// require the incoming message formats to be SLF4J-specific.
logger.debug(String.format(methodTag(configKey) + format, args));
if (logger.isDebugEnabled()) {
logger.debug(String.format(methodTag(configKey) + format, args));
}
}
}