
Add the ready-to-use jars (main and docs) files from build/libs to your class path. Check out the documents in jar to have all the information about this library.
To instance the most basic resource monitor just call:
ResourceMonitor r = new ResourceMonitor();
Otherwise there is a constructor to specify the updating rate and if the corrispondig frame will be always on top.
ResourceMonitor r = new ResourceMonitor(500, true);
ResourceMonitor extends Thread class, so you need to start it:
r.run();
Here is the logger initialization:
Logger l = Logger.getInstance();
Now, where you need, you can call:
l.write( Tag.DEBUG, "some message" );
to write a DEBUG string on Standard out. When you put your code in production, you can set this Logger to exclude DEBUG log:
l.disableTag( Tag.DEBUG );
and change the out stream on File (for example):
l.setPrintStream(new PrintStream(new File("path/to/file.log")));
InfoCollecter is a final class, so could be use directly like this:
FileWriter fw = new FileWriter( new File( "test.json" ) );
InfoCollecter.collect( fw );