import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
-
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class MirrorMakerProcessHandler {
- static final Logger logger = Logger.getLogger(MirrorMakerProcessHandler.class);
+ private static final Logger logger = LogManager.getLogger(MirrorMakerProcessHandler.class);
static String mmagenthome = "/opt";
public static boolean checkMirrorMakerProcess(String agentname, boolean enablelogCheck, String grepLog) throws Exception {
logger.info("Mirror Maker " + agentname + " Stopped");
} catch (Exception e) {
- e.printStackTrace();
+ logger.error("exception occured in stopMirrorMaker ", e);
}
}
// System.out.println(line);
}
} catch (Exception anExc) {
- anExc.printStackTrace();
+ logger.error("exception occured in startMirrorMaker ", anExc);
}
}
}.start();
// System.out.println(line);
}
} catch (Exception anExc) {
- anExc.printStackTrace();
+ logger.error("exception occured in startMirrorMaker ", anExc);
}
}
}.start();
logger.info("Mirror Maker " + agentName + " Started" + " WhiteListing:" + whitelist);
} catch (Exception e) {
- e.printStackTrace();
+ logger.error("exception occured in startMirrorMaker ", e);
}
}
}