From f577f8df768d2288876cd982822cba325b70d251 Mon Sep 17 00:00:00 2001 From: "Muller, Andrew (am8383)" Date: Fri, 13 Mar 2020 14:16:36 -0400 Subject: Add test file Issue-ID: AAI-2829 Signed-off-by: Muller, Andrew (am8383) Change-Id: I6b19ff4da5fc1d51e8da2a364113f693ef80cfd3 --- .../onap/aai/datasnapshot/DataSnapshot4HistInit.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/onap/aai/datasnapshot/DataSnapshot4HistInit.java b/src/main/java/org/onap/aai/datasnapshot/DataSnapshot4HistInit.java index 03ff51a..8d250d7 100644 --- a/src/main/java/org/onap/aai/datasnapshot/DataSnapshot4HistInit.java +++ b/src/main/java/org/onap/aai/datasnapshot/DataSnapshot4HistInit.java @@ -109,14 +109,6 @@ public class DataSnapshot4HistInit { */ public static void main(String[] args) { - // Set the logging file properties to be used by EELFManager - System.setProperty("aai.service.name", DataSnapshot4HistInit.class.getSimpleName()); - Properties props = System.getProperties(); - props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_LOGBACK_PROPS); - props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG); - LOGGER = LoggerFactory.getLogger(DataSnapshot4HistInit.class); - - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(); PropertyPasswordConfiguration initializer = new PropertyPasswordConfiguration(); initializer.initialize(ctx); @@ -157,6 +149,13 @@ public class DataSnapshot4HistInit { public boolean executeCommand(String[] args) { + // Set the logging file properties to be used by EELFManager + System.setProperty("aai.service.name", DataSnapshot4HistInit.class.getSimpleName()); + Properties props = System.getProperties(); + props.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME, AAIConstants.AAI_LOGBACK_PROPS); + props.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH, AAIConstants.AAI_HOME_BUNDLECONFIG); + LOGGER = LoggerFactory.getLogger(DataSnapshot4HistInit.class); + Boolean dbClearFlag = false; JanusGraph graph = null; String command = "UNKNOWN"; @@ -1076,4 +1075,4 @@ public class DataSnapshot4HistInit { } -} \ No newline at end of file +} -- cgit