Add exception logging and config value to set logging level.