Add test for programmatic log switching