Open labbenchstudios opened 4 years ago
in order to use _Logger from BaseSystemUtilTask, it should become protected or public in BaseSystemUtilTask:
protected static final Logger _Logger = Logger.getLogger(BaseSystemUtilTask.class.getName());
Logging is on a per class / type basis, so each specific type has its own private instance by design.
Description
Review the README
Estimated effort may vary greatly
Actions
NOTE: The implementation examples depicted here are only one way to implement the requirements listed. Your own implementation may vary of course.
programmingtheiot.gda.system
package, create a new Java class namedSystemMemUtilTask
. This should be derived from BaseSystemUtilTask.import java.util.logging.Logger;
import programmingtheiot.common.ConfigConst;
@Override public float getTelemetryValue() { MemoryUsage memUsage = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage(); double memUsed = (double) memUsage.getUsed(); double memMax = (double) memUsage.getMax();
}