import java.util.ArrayList;
import java.util.Properties;
+import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.jasypt.util.text.BasicTextEncryptor;
}
input = new FileInputStream(mmagenthome + "/etc/" + agentName + propName + ".properties");
} catch (IOException ex) {
+ logger.error(" IOException will be handled " + ex);
try {
input = new FileInputStream(mmagenthome + "/etc/" + propName + ".properties");
Properties prop = new Properties();
prop.store(out, "");
} catch (Exception e) {
- e.printStackTrace();
+ logger.error("Exception at checkPropertiesFile " +e);
}
} finally {
if (input != null) {
}
}
logger.info("Adding new MirrorMaker:" + newMirrorMaker.name);
- if (!exists && mirrorMakers != null) {
+ if (exists == false && mirrorMakers != null) {
mirrorMakers.getListMirrorMaker().add(newMirrorMaker);
} else if (exists == false && mirrorMakers == null) {
mirrorMakers = new ListMirrorMaker();
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
+ logger.log(Level.WARN, "Interrupted!", e);
+ Thread.currentThread().interrupt();
}
} catch (IOException ex) {
- ex.printStackTrace();
+ logger.error(" IOException Occered " + ex);
} finally {
if (out != null) {
try {
out.close();
} catch (IOException e) {
- e.printStackTrace();
+ logger.error(" IOException Occered " + e);
}
}
}