// Keep the thread live until terminated
// start log publishing
LogPublisherManager logPublisherManager = new LogPublisherManager();
publishLogs(logPublisherManager);
while (!terminated) {
try {
Thread.sleep(1000);
} catch (InterruptedException ignore) {
}
}
logPublisherManager.stop();
}