Clean up live-analysis code

* use yaml config and logging module

Also:
* log.error is duplicated to stderr

Change-Id: Ida829bf5f48c2c5b2373e82b2387fd8440f3ebed