Skip to content

Commit

Permalink
Automatic code cleanup.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 415349792
  • Loading branch information
Googler authored and copybara-github committed Dec 9, 2021
1 parent 5c5f785 commit ccc9b9d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ public boolean actionCacheHit(ActionCachedContext executor) {
.getContext(TestActionContext.class)
.newCachedTestResult(executor.getExecRoot(), this, cachedTestResultData.get()));
} catch (IOException e) {
logger.atInfo().log(getErrorMessageOnNewCachedTestResultError(e.getMessage()));
logger.atInfo().log("%s", getErrorMessageOnNewCachedTestResultError(e.getMessage()));
executor
.getEventHandler()
.handle(Event.warn(getErrorMessageOnNewCachedTestResultError(e.getMessage())));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ private synchronized void reportSystemLoadAdvisoryEvent(boolean isInitialValue,

if (value < 0 || value > 100) {
// values outside this range are not expected.
logger.atSevere().log(logString);
logger.atSevere().log("%s", logString);
} else if (value > 50) {
// 50 arbitrarily chosen as point where user is likely to be more concerned.
logger.atWarning().log(logString);
logger.atWarning().log("%s", logString);
} else if (!isInitialValue || value > 25) {
// Don't spam the logs if we have a Great or OK value at startup.
logger.atInfo().log(logString);
logger.atInfo().log("%s", logString);
}
if (reporter != null) {
reporter.post(event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ synchronized void memoryPressureCallback(int value) {
if (reporter != null) {
reporter.post(event);
}
logger.atInfo().log(event.logString());
logger.atInfo().log("%s", event.logString());
eventCount += 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public synchronized void afterCommand() {
/** Callback method called from JNI whenever a suspension event occurs. */
synchronized void suspendCallback(int reason) {
SystemSuspensionEvent event = new SystemSuspensionEvent(reason);
logger.atInfo().log(event.logString());
logger.atInfo().log("%s", event.logString());
if (reporter != null) {
reporter.post(event);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ private synchronized void reportThermalEvent(boolean isInitialValue, int value)

if (value < 0 || value > 100) {
// values outside this range are not expected.
logger.atSevere().log(logString);
logger.atSevere().log("%s", logString);
} else if (value > 50) {
// 50 arbitrarily chosen as point where user is likely to be more concerned.
logger.atWarning().log(logString);
logger.atWarning().log("%s", logString);
} else if (!isInitialValue || value != 0) {
// Don't spam the logs if we have a nominal value at startup.
logger.atInfo().log(logString);
logger.atInfo().log("%s", logString);
}
if (reporter != null) {
reporter.post(event);
Expand Down

0 comments on commit ccc9b9d

Please sign in to comment.