package com.siemens.oss.omniproperties;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.siemens.oss.omniproperties.util.ReflectionUtil;


/**
 * This class calls a "command" in the currently active shell. The 'shellCommand' must
 * be given to the constructor of this class. Therefore this class can be used
 * for any kind of preprocessing steps outside of Java.    
 * 
 * @author Michel Tokic
 */
public final class ShellExecutor implements Runnable {
	
	private String shellCommand = "";
	
	private static final Logger LOG = LoggerFactory
			.getLogger(ShellExecutor.class);
	
	public ShellExecutor (String shellCommand) {
		this.shellCommand = shellCommand;
	}

	public void run() {
		try {
			// execute shell command
			LOG.info(" => executing command '" + this.shellCommand + "'");
			Process p = Runtime.getRuntime().exec(this.shellCommand);			
            
			// write shell output to console output
            BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
            String line=reader.readLine();

            while (line != null) {    
            	LOG.info(line);
                line = reader.readLine();
            }
			
		} catch (IOException e) {
			e.printStackTrace();
		}	
	}
}

@@ -138,131 +138,8 @@
 %0D%0A%0D%0A
-import org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactory;%0D%0A%0D%0Aimport com.siemens.oss.omniproperties.util.ReflectionUtil;%0D%0A%0D%0A
 %0D%0A/*
@@ -375,16 +375,67 @@
  %0D%0A * %0D%0A
+ * The output of the shell is written to STDOUT. %0D%0A
  * @auth
@@ -558,98 +558,8 @@
 %0A%09%0D%0A
-%09private static final Logger LOG = LoggerFactory%0D%0A%09%09%09.getLogger(ShellExecutor.class);%0D%0A%09%0D%0A
 %09pub
@@ -707,24 +707,35 @@
 and%0D%0A%09%09%09
-LOG.info
+System.out.println 
 (%22 =%3E ex
@@ -1107,17 +1107,30 @@
     
-%09LOG.info
+    System.out.println
 (lin

Revert "adapted to LoggerFactory"