Controlling logging