From 924b18d7469204ceaae60d7345712ea09f75a674 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Thu, 5 Apr 2018 20:17:18 -0500 Subject: Add Certs, Docker Build Issue-ID: AAF-211 Change-Id: Idc7630578155586a6e53d7af80dd16e4e0ac41ca Signed-off-by: Instrumental --- .../java/org/onap/aaf/misc/env/log4j/LogFileNamer.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'misc/log4j') 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); -- cgit 1.2.3-korg