private DefaultGradleLauncher doNewInstance(StartParameter startParameter, BuildRequestMetaData requestMetaData) {
TopLevelBuildServiceRegistry serviceRegistry = new TopLevelBuildServiceRegistry(sharedServices, startParameter);
serviceRegistry.add(BuildRequestMetaData.class, requestMetaData);
serviceRegistry.add(BuildClientMetaData.class, requestMetaData.getClient());
ListenerManager listenerManager = serviceRegistry.get(ListenerManager.class);
LoggingManagerInternal loggingManager = serviceRegistry.newInstance(LoggingManagerInternal.class);
loggingManager.setLevel(startParameter.getLogLevel());
loggingManager.colorStdOutAndStdErr(startParameter.isColorOutput());
//this hooks up the ListenerManager and LoggingConfigurer so you can call Gradle.addListener() with a StandardOutputListener.
loggingManager.addStandardOutputListener(listenerManager.getBroadcaster(StandardOutputListener.class));