Rename all logger instances to "logger" (instead "LOG" or "log").
RELNOTES: None.
PiperOrigin-RevId: 167505493
diff --git a/src/main/java/com/google/devtools/build/lib/server/IdleServerTasks.java b/src/main/java/com/google/devtools/build/lib/server/IdleServerTasks.java
index db7cd4d..0a2c702 100644
--- a/src/main/java/com/google/devtools/build/lib/server/IdleServerTasks.java
+++ b/src/main/java/com/google/devtools/build/lib/server/IdleServerTasks.java
@@ -37,7 +37,7 @@
private final Path workspaceDir;
private final ScheduledThreadPoolExecutor executor;
- private static final Logger log = Logger.getLogger(IdleServerTasks.class.getName());
+ private static final Logger logger = Logger.getLogger(IdleServerTasks.class.getName());
private static final long FIVE_MIN_MILLIS = 1000 * 60 * 5;
@@ -57,10 +57,11 @@
Preconditions.checkState(!executor.isShutdown());
// Do a GC cycle while the server is idle.
- @SuppressWarnings("unused")
+ @SuppressWarnings("unused")
Future<?> possiblyIgnoredError =
- executor.schedule(() -> {
- try (AutoProfiler p = AutoProfiler.logged("Idle GC", log)) {
+ executor.schedule(
+ () -> {
+ try (AutoProfiler p = AutoProfiler.logged("Idle GC", logger)) {
System.gc();
}
},
@@ -130,7 +131,7 @@
try {
memInfo = new ProcMeminfoParser();
} catch (IOException e) {
- log.info("Could not process /proc/meminfo: " + e);
+ logger.info("Could not process /proc/meminfo: " + e);
return true;
}
@@ -150,9 +151,8 @@
// If the system as a whole is low on memory, let this server die.
if (fractionFree < .1) {
- log.info("Terminating due to memory constraints");
- log.info(String.format("Total physical:%d\nTotal free: %d\n",
- totalPhysical, totalFree));
+ logger.info("Terminating due to memory constraints");
+ logger.info(String.format("Total physical:%d\nTotal free: %d\n", totalPhysical, totalFree));
return false;
}