Rework logging completely.