Some improvements to the new Logging API

I rebased master into this so it could be automatically merged, hence the size of the pull request. Sorry!

See https://github.com/jwestberg/Hydra/commit/8520ec2e9a49b529157b8e1b6c8867c67f14adbd for my actual changes.