Factor out logging config, call from wsgi script.

Previously we were only configuring the logger from the cli tool.