public interface IntervalLoggerController
IntervalLogger wd = SecurityLoggingFactory.getIntervalLoggerControllerInstance();
wd.start();
...
//Call the following before exit or to stop background logging
wd.stop();
Once the logger is started with the DefaultIntervalLoggerView a system
status is logged every 15 seconds. A sample of the default log output.
Watchdog: MemoryTotal=64.5MB, FreeMemory=58.2MB, MaxMemory=954.7MB, Threads Total=5, Threads New=0, Threads Runnable=3, Threads Blocked=0, Threads Waiting=2, Threads Terminated=0
Developers can customize by including their own properites to log,
remove default properties, or change the format and priority of the
status message logged.DefaultIntervalLoggerView| Modifier and Type | Method and Description |
|---|---|
void |
setStatusMessageModel(IntervalLoggerModel m)
Set the status message model.
|
void |
setStatusMessageView(IntervalLoggerView v)
Set the status message view.
|
void |
start()
Start the IntervalLogger instance and log status each default 15-second interval.
|
void |
start(int interval)
Start the IntervalLogger instance and log status each user defined interval.
|
void |
stop()
Stop background thread at earliest opportunity.
|
void start()
void start(int interval)
interval - Status logging interval in milliseconds.void stop()
void setStatusMessageView(IntervalLoggerView v)
v - IntervalLoggerView instance. If no view assigned, a
DefaultIntervalLoggerView instance is assigned by default.DefaultIntervalLoggerViewvoid setStatusMessageModel(IntervalLoggerModel m)
m - IntervalLoggerModel instance. If no model is assigned, the
DefaultIntervalLoggerModel is assigned by default. To change theDefaultIntervalLoggerModelCopyright © 2021. All rights reserved.