summaryrefslogtreecommitdiffstats
path: root/auth/auth-certman
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-certman')
-rw-r--r--auth/auth-certman/pom.xml1
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/AAF_CM.java17
2 files changed, 16 insertions, 2 deletions
diff --git a/auth/auth-certman/pom.xml b/auth/auth-certman/pom.xml
index 48e8f0b1..cfd08ce5 100644
--- a/auth/auth-certman/pom.xml
+++ b/auth/auth-certman/pom.xml
@@ -27,6 +27,7 @@
<properties>
<!-- SONAR -->
+ <sonar.skip>true</sonar.skip>
<jacoco.version>0.7.7.201606060606</jacoco.version>
<sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/AAF_CM.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/AAF_CM.java
index c1bc8202..aee48870 100644
--- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/AAF_CM.java
+++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/AAF_CM.java
@@ -22,6 +22,7 @@
package org.onap.aaf.auth.cm;
+import java.io.File;
import java.lang.reflect.Constructor;
import java.util.Map;
import java.util.Map.Entry;
@@ -49,6 +50,7 @@ import org.onap.aaf.auth.env.AuthzTransFilter;
import org.onap.aaf.auth.rserv.HttpMethods;
import org.onap.aaf.auth.server.AbsService;
import org.onap.aaf.auth.server.JettyServiceStarter;
+import org.onap.aaf.auth.server.Log4JLogIt;
import org.onap.aaf.cadi.Access;
import org.onap.aaf.cadi.CadiException;
import org.onap.aaf.cadi.LocatorException;
@@ -226,10 +228,21 @@ public class AAF_CM extends AbsService<AuthzEnv, AuthzTrans> {
}
public static void main(final String[] args) {
- PropAccess propAccess = new PropAccess(args);
try {
+ String propsFile = getArg(AAF_LOG4J_PREFIX, args, "org.osaaf")+".log4j.props";
+ String log_dir = getArg(Config.CADI_LOGDIR,args,"./logs");
+ String log_level = getArg(Config.CADI_LOGLEVEL,args,"INFO");
+ File logs = new File(log_dir);
+ if(!logs.isDirectory()) {
+ logs.delete();
+ }
+ if(!logs.exists()) {
+ logs.mkdirs();
+ }
+ Log4JLogIt logIt = new Log4JLogIt(log_dir,log_level,propsFile, "cm");
+ PropAccess propAccess = new PropAccess(logIt,args);
+
AAF_CM service = new AAF_CM(new AuthzEnv(propAccess));
-// env.setLog4JNames("log4j.properties","authz","cm","audit","init","trace");
JettyServiceStarter<AuthzEnv,AuthzTrans> jss = new JettyServiceStarter<AuthzEnv,AuthzTrans>(service);
jss.start();
} catch (Exception e) {