summaryrefslogtreecommitdiffstats
path: root/misc/log4j/src/main/java/org
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-06-13 17:19:07 -0500
committerInstrumental <jonathan.gathman@att.com>2018-06-13 17:21:44 -0500
commiteeed2ae14fceb21c9518a0056b2a29039b69f092 (patch)
treed455fa96f904589c442c25f4aad8a4093b3d7aaa /misc/log4j/src/main/java/org
parent06c8b84216abecd48488741a688317a74a17b348 (diff)
Adjust Logging Dir settings for ONAP Users
Issue-ID: AAF-360 Change-Id: If19090ef482372d3a3a9aa2856762af91bc54017 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'misc/log4j/src/main/java/org')
-rw-r--r--misc/log4j/src/main/java/org/onap/aaf/misc/env/log4j/LogFileNamer.java7
1 files changed, 3 insertions, 4 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 a98ba7c0..c6537deb 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
@@ -59,15 +59,14 @@ public class LogFileNamer {
* @throws IOException
*/
public String setAppender(String appender) throws IOException {
- String filename;
int i = 0;
File f;
- while ((f = new File(filename = String.format(FILE_FORMAT_STR, dir, root, appender, ending, i))).exists()) {
+ while ((f = new File(String.format(FILE_FORMAT_STR, dir, root, appender, ending, i))).exists()) {
++i;
}
- ;
+
f.createNewFile();
- System.setProperty("LOG4J_FILENAME_" + appender, filename);
+ System.setProperty("LOG4J_FILENAME_" + appender, f.getCanonicalPath());
return appender;
}