abstract out log parsing, handle gevent errors