Add a config setting to log to a file

This logs all exception & stack traces by default.

If you want to log a warning, you can do something like:

```python
app.logger.warn("Something is bad!")
```

and it will show up in either the log file or the console depending on settings.
It's a threshold, so this will log anything WARNING and above (e.g. ERROR and CRITICAL). See https://docs.python.org/2/library/logging.html#logging.Logger.setLevel