Configure logging

Allow the configuration of logging via a LOGGING dictionary in the config.