import java.util.ArrayList;
import java.util.Properties;
+import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.jasypt.util.text.BasicTextEncryptor;
try {
input.close();
} catch (IOException e) {
- e.printStackTrace();
+ logger.error(" IOException occers " + e);
}
}
}
}
logger.info("kakahome is set :" + kafkahome);
} catch (IOException ex) {
- logger.error(kafkahome + "/bin/kafka-run-class.sh not found. Make sure kafka home is set correctly");
+ logger.error(kafkahome + "/bin/kafka-run-class.sh not found. Make sure kafka home is set correctly" + ex);
return false;
} finally {
if (input != null) {
try {
input.close();
} catch (IOException e) {
- e.printStackTrace();
+ logger.error("IOException" + e);
}
}
}
}
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) {
try {
input.close();
} catch (IOException e) {
- e.printStackTrace();
+ logger.error("Exception occurred is " +e);
}
}
if (out != null) {
out.close();
} catch (IOException e) {
e.printStackTrace();
+ logger.error("IOException" + e);
}
}
}
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
}
mirrorMakers.getListMirrorMaker().set(i, mm);
} else {
}
} catch (Exception e) {
- e.printStackTrace();
+ logger.error("Exception is : " +e);
}
}
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
+ logger.log(Level.WARN, "Interrupted!", e);
+ Thread.currentThread().interrupt();
}
} catch (IOException ex) {
ex.printStackTrace();
out.close();
} catch (IOException e) {
e.printStackTrace();
+ logger.error("IOException occered " + e);
}
}
}