[Reviewer: Ellie] Set up our logging functionality earlier

Fixes https://github.com/Metaswitch/sprout/issues/417.