set mmagenthome for logs 65/85365/1 1.1.2
authorsunil.unnava <sunil.unnava@att.com>
Mon, 15 Apr 2019 19:49:32 +0000 (15:49 -0400)
committersunil.unnava <sunil.unnava@att.com>
Mon, 15 Apr 2019 19:49:55 +0000 (15:49 -0400)
Issue-ID: DMAAP-1139
Change-Id: Ic81c51103b17a0f99390c51b54dbf07100830c34
Signed-off-by: sunil.unnava <sunil.unnava@att.com>
pom.xml
src/main/java/org/onap/dmaap/mr/dmaapMMAgent/MirrorMakerAgent.java
src/main/java/org/onap/dmaap/mr/dmaapMMAgent/utils/MirrorMakerProcessHandler.java
src/main/resources/log4j.properties
version.properties

diff --git a/pom.xml b/pom.xml
index f840099..a7d2230 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
 
        <groupId>org.onap.dmaap.messagerouter.mirroragent</groupId>
        <artifactId>dmaapMMAgent</artifactId>
-       <version>1.1.1-SNAPSHOT</version>
+       <version>1.1.2-SNAPSHOT</version>
        <packaging>jar</packaging>
 
        <parent>
index c205440..afab7f6 100644 (file)
@@ -92,11 +92,10 @@ public class MirrorMakerAgent {
        private boolean checkStartup() {
                FileInputStream input = null;
                try {
-                       //this.mmagenthome = System.getProperty("MMAGENTHOME");
                        input = new FileInputStream(mmagenthome + "/etc/mmagent.config");
                        logger.info("mmagenthome is set :" + mmagenthome + " loading properties at /etc/mmagent.config");
                } catch (IOException ex) {
-                       logger.error(mmagenthome + "/etc/mmagent.config not found.  Set -DMMAGENTHOME and check the config file");
+                       logger.error(mmagenthome + "/etc/mmagent.config not found.");
                        return false;
                } finally {
                        if (input != null) {
@@ -111,7 +110,7 @@ public class MirrorMakerAgent {
                input = null;
                try {
                        input = new FileInputStream(kafkahome + "/bin/kafka-run-class.sh");
-                       logger.info("kakahome is set :" + kafkahome);
+                       logger.info("kafkahome is set :" + kafkahome);
                } catch (IOException ex) {
                        logger.error(kafkahome + "/bin/kafka-run-class.sh not found.  Make sure kafka home is set correctly");
                        return false;
index 9b5f863..a73ac70 100644 (file)
@@ -29,7 +29,7 @@ import org.apache.log4j.Logger;
 
 public class MirrorMakerProcessHandler {
        static final Logger logger = Logger.getLogger(MirrorMakerProcessHandler.class);
-       static String mmagenthome = System.getProperty("MMAGENTHOME");
+       static String mmagenthome = "/opt";
 
        public static boolean checkMirrorMakerProcess(String agentname, boolean enablelogCheck, String grepLog) throws Exception {
                String line,linelog;
index a0ac24f..9225695 100644 (file)
@@ -30,7 +30,7 @@ log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p - %m
 
 # Redirect log messages to a log file, support file rolling.
 log4j.appender.file=org.apache.log4j.RollingFileAppender
-log4j.appender.file.File= ${MMAGENTHOME}/logs/mmagent.log
+log4j.appender.file.File= /opt/logs/mmagent.log
 log4j.appender.file.MaxFileSize=5MB
 log4j.appender.file.MaxBackupIndex=10
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
index e1118ab..ac02ac5 100644 (file)
@@ -27,7 +27,7 @@
 
 major=1
 minor=1
-patch=1
+patch=2
 
 base_version=${major}.${minor}.${patch}
 

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use