Tweak logging in generated code