Using logging for control and audit output