// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

package com.yahoo.vespa.hosted.node.admin.task.util.process;

import static com.yahoo.vespa.hosted.node.admin.task.util.file.IOExceptionUtil.uncheck;

/**
 * @author hakonhall
 */
public class ProcessStarterImpl implements ProcessStarter {
    @Override
    public ProcessApi2 start(ProcessBuilder processBuilder) {
        Process process = uncheck(() -> processBuilder.start());
        return new ProcessApi2Impl(process);
    }
}

@@ -175,16 +175,82 @@
 ocess;%0A%0A
+import com.yahoo.log.LogLevel;%0A%0Aimport java.util.logging.Logger;%0A%0A
 import s
@@ -427,79 +427,324 @@
     
-@Override%0A    public ProcessApi2 start(ProcessBuilder processBuilder) %7B
+private static final Logger logger = Logger.getLogger(ProcessStarterImpl.class.getName());%0A%0A    @Override%0A    public ProcessApi2 start(ProcessBuilder processBuilder) %7B%0A        if (logger.isLoggable(LogLevel.DEBUG)) %7B%0A            logger.log(LogLevel.DEBUG, %22Spawning process: %22 + processBuilder.command());%0A        %7D%0A
 %0A   

Add debug of all spawned processes