[Reviewer: Rob] Set up our logging functionality earlier

Rob,

Please can you review my fix to #7?  This is exactly the same as your fix to sprout (https://github.com/Metaswitch/sprout/pull/441).

Thanks,

Matt