summaryrefslogtreecommitdiffstats
path: root/misc/log4j/src
diff options
context:
space:
mode:
authorInstrumental <jcgmisc@stl.gathman.org>2018-04-05 20:17:18 -0500
committerInstrumental <jcgmisc@stl.gathman.org>2018-04-05 20:17:25 -0500
commit924b18d7469204ceaae60d7345712ea09f75a674 (patch)
treeb4584c2731c82f484a31feadcb71d75c3613af43 /misc/log4j/src
parent33e7b1a9fa15b0b699d16e359b406195b7fe87be (diff)
Add Certs, Docker Build
Issue-ID: AAF-211 Change-Id: Idc7630578155586a6e53d7af80dd16e4e0ac41ca Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
Diffstat (limited to 'misc/log4j/src')
-rw-r--r--misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java b/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java
index ff7b43f0..cc4c8a96 100644
--- a/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java
+++ b/misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java
@@ -67,19 +67,19 @@ public class LogFileNamer {
};
f.createNewFile();
System.setProperty(
- "LOG4J_FILENAME_"+(appender),
+ "LOG4J_FILENAME_"+appender,
filename);
return appender;
}
- public void configure(final String props, final String log_level) throws IOException {
- String fname;
- if(new File(fname="etc/"+props).exists()) {
- org.apache.log4j.PropertyConfigurator.configureAndWatch(fname,60*1000L);
+ public void configure(final String path, final String fname, final String log_level) throws IOException {
+ final String fullPath=path+'/'+fname;
+ if(new File(fullPath).exists()) {
+ org.apache.log4j.PropertyConfigurator.configureAndWatch(fullPath,60*1000L);
} else {
- URL rsrc = ClassLoader.getSystemResource(props);
+ URL rsrc = ClassLoader.getSystemResource(fname);
if(rsrc==null) {
- String msg = "Neither File: " + fname + " or resource on Classpath " + props + " exist" ;
+ String msg = "Neither File: " + path + '/' + fname + " nor resource on Classpath " + fname + " exist" ;
throw new IOException(msg);
}
org.apache.log4j.PropertyConfigurator.configure(rsrc);