summaryrefslogtreecommitdiffstats
path: root/misc/log4j/src/test/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/test/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/test/java/org')
-rw-r--r--misc/log4j/src/test/java/org/onap/aaf/misc/env/log4j/JU_LogFileNamerTest.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/misc/log4j/src/test/java/org/onap/aaf/misc/env/log4j/JU_LogFileNamerTest.java b/misc/log4j/src/test/java/org/onap/aaf/misc/env/log4j/JU_LogFileNamerTest.java
index 0ee79a5f..b96d6dd0 100644
--- a/misc/log4j/src/test/java/org/onap/aaf/misc/env/log4j/JU_LogFileNamerTest.java
+++ b/misc/log4j/src/test/java/org/onap/aaf/misc/env/log4j/JU_LogFileNamerTest.java
@@ -34,6 +34,7 @@ import org.junit.Before;
import org.junit.Test;
public class JU_LogFileNamerTest {
+ private File dir = new File(".");
private String ending = new SimpleDateFormat("YYYYMMdd").format(new Date());
@@ -43,26 +44,26 @@ public class JU_LogFileNamerTest {
@Test
public void test() throws IOException {
- LogFileNamer logFileNamer = new LogFileNamer(".", "log");
+ LogFileNamer logFileNamer = new LogFileNamer(dir.getCanonicalPath(), "log");
assertEquals(logFileNamer, logFileNamer.noPID());
logFileNamer.setAppender("Append");
- assertEquals(System.getProperty("LOG4J_FILENAME_Append"), "./log-Append" + ending + "_0.log");
+ assertEquals(System.getProperty("LOG4J_FILENAME_Append"), dir.getCanonicalFile()+"/log-Append" + ending + "_0.log");
logFileNamer.setAppender("Append");
- assertEquals(System.getProperty("LOG4J_FILENAME_Append"), "./log-Append" + ending + "_1.log");
+ assertEquals(System.getProperty("LOG4J_FILENAME_Append"), dir.getCanonicalFile()+"/log-Append" + ending + "_1.log");
}
@Test
public void testBlankRoot() throws IOException {
- LogFileNamer logFileNamer = new LogFileNamer(".", "");
+ LogFileNamer logFileNamer = new LogFileNamer(dir.getCanonicalPath(), "");
assertEquals(logFileNamer, logFileNamer.noPID());
logFileNamer.setAppender("Append");
- assertEquals(System.getProperty("LOG4J_FILENAME_Append"), "./Append" + ending + "_0.log");
+ assertEquals(System.getProperty("LOG4J_FILENAME_Append"), dir.getCanonicalPath()+"/Append" + ending + "_0.log");
logFileNamer.setAppender("Append");
- assertEquals(System.getProperty("LOG4J_FILENAME_Append"), "./Append" + ending + "_1.log");
+ assertEquals(System.getProperty("LOG4J_FILENAME_Append"), dir.getCanonicalPath()+"/Append" + ending + "_1.log");
}
@After