Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed Oct 30, 2023
1 parent c8b998c commit abac081
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ void logMessage(String log) {

/** Logs the error but if {@code logDetails} is true, then also prints detailed debugging info. */
public void log(Stats stats, String statPrefix, String logPrefix, boolean logDetails) {
if (logDetails && detailsSupplier != null) {
if (logDetails) {
stats.dataError(statPrefix + "_" + stat());
String log = logPrefix + ": " + getMessage() + "\n" + detailsSupplier.get();
String log = logPrefix + ": " + getMessage();
if (detailsSupplier != null) {
log += "\n" + detailsSupplier.get();
}
LOGGER.warn(log, this);
assert nonFatal : log; // make unit tests fail if fatal
} else {
Expand Down

0 comments on commit abac081

Please sign in to comment.