File logDir = new File(homeDir, "logs");
if (!logDir.exists()) {
logDir.mkdirs();
}
File logFile = new File(logDir, "admin-console.log");
OutputStreamLogSink logSink = new OutputStreamLogSink(logFile.toString());
logSink.start();
LogImpl log = (LogImpl) Factory.getFactory().getInstance("");
// Ignore INFO logs.
log.setVerbose(-1);
log.add(logSink);