code: public static CliOutput executeCommandLine(final Commandline cli, final String loggerName, final String logMessagePrefix,
  			final InputStream inputStream, final int timeoutInSeconds) {
  		try {
  			String cliString = CommandLineUtils.toString(cli.getShellCommandline());
  			LOGGER.info("Executing command-line: {}", cliString);
  
  			LoggingStreamConsumer stdOut = new LoggingStreamConsumer(loggerName, logMessagePrefix, false);
  			LoggingStreamConsumer stdErr = new LoggingStreamConsumer(loggerName, logMessagePrefix, true);
  
  			int exitCode = CommandLineUtils.executeCommandLine(cli, inputStream, stdOut, stdErr, timeoutInSeconds);
  			return new CliOutput(stdOut.getOutput(), stdErr.getOutput(), exitCode);
  		} catch (CommandLineException ex) {
  			throw new CliException("Error executing command-line process.", ex);
  		}
  	}
docs: Executes the specified command line and blocks until the process has finished or till the
  timeout is reached. The output of the process is captured, returned, as well as logged with
  info (stdout) and error (stderr) level, respectively.
  
  @param cli
  the command line
  @param loggerName
  the name of the logger to use (passed to {@link LoggerFactory#getLogger(String)});
  if {@code null} this class' name is used
  @param logMessagePrefix
  if non-{@code null} consumed lines are prefix with this string
  @param inputStream
  the process input to read from, must be thread safe
  @param timeoutInSeconds
  a positive integer to specify timeout, zero and negative integers for no timeout
  
  @return the process' output