Major overhaul to the logging module.