Move setup of logger to seperate method.

During test coverage checking we do not have configuration available, resulting in optparse sys.exit'ing and nosetests becoming unhappy.