Log test output to console with command line switch

Can I enable logging of test output to the console with a command line switch or must I modify my build script? I’d like to be able to show test output to the console optionally.

You can check if a system or project property is set, and configure the test task accordingly.