Adds logging and log rotation. Logs errors as well as successes.