Versions used:
- SonarCloud
- Source and target compile level = Java 14
- org.sonarqube Gradle plugin version 2.8
- Slf4J version 1.7.30
Sample:
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
// ...
private static final Logger log = LoggerFactory.getLogger(PvWattsApi.class);
// ...
} catch (RestClientException e) {
log.error("PV Watts API call failed. Reason " + e.getMessage(), e);
return Optional.empty();
}
There is no SLF4J API method that takes a format String, args, and a Throwable
- here we are using error(String msg, Throwable e)
, so the comment about format specifiers is a false-positive.
Image:
Possibly somewhat releated thread: