Move logger before _connect() (which uses logger)

* Formatting
* How did this compile before?