Using signals to turn logging on and off