summaryrefslogtreecommitdiffstats
path: root/feature-eelf/src/main
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-09-13 20:37:15 -0400
committerPamela Dragosh <pdragosh@research.att.com>2018-09-13 20:56:08 -0400
commitad83319991bdd6a25416eff9f0adde148e2eee35 (patch)
treebbaa601361802763cebf014160b87fa897d62a58 /feature-eelf/src/main
parentc733c08b7201ffdee81c7dab2ed50a1ce8fd5bbb (diff)
Fix checkstyle for features submodules.
These are the remaining submodules that have checkstyle. Pretty clean compile after this. There were a couple of sonar fixes in there also. Issue-ID: POLICY-882 Change-Id: I8191ea1aa261f4a7b9d3d21c108572fd31db1b8c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'feature-eelf/src/main')
-rw-r--r--feature-eelf/src/main/java/org/onap/policy/drools/eelf/EelfFeature.java72
1 files changed, 37 insertions, 35 deletions
diff --git a/feature-eelf/src/main/java/org/onap/policy/drools/eelf/EelfFeature.java b/feature-eelf/src/main/java/org/onap/policy/drools/eelf/EelfFeature.java
index aac456e2..bf0f0000 100644
--- a/feature-eelf/src/main/java/org/onap/policy/drools/eelf/EelfFeature.java
+++ b/feature-eelf/src/main/java/org/onap/policy/drools/eelf/EelfFeature.java
@@ -31,43 +31,45 @@ import org.onap.policy.drools.system.Main;
import org.onap.policy.drools.system.PolicyEngine;
/**
- * Feature EELF : Enables EELF Logging Libraries
+ * Feature EELF : Enables EELF Logging Libraries .
*/
public class EelfFeature implements PolicyEngineFeatureAPI {
- @Override
- public final boolean beforeBoot(PolicyEngine engine, String[] cliArgs) {
-
- String logback = System.getProperty(Main.LOGBACK_CONFIGURATION_FILE_SYSTEM_PROPERTY,
- Main.LOGBACK_CONFIGURATION_FILE_DEFAULT);
- Path logbackPath = Paths.get(logback);
-
- if (System.getProperty(Configuration.PROPERTY_LOGGING_FILE_PATH) == null)
- System.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH,
- logbackPath.toAbsolutePath().getParent().toString());
-
- if (System.getProperty(Configuration.PROPERTY_LOGGING_FILE_NAME) == null)
- System.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME,
- logbackPath.getFileName().toString());
-
- Logger logger = FlexLogger.getLogger(this.getClass(), true);
-
- if (logger.isInfoEnabled()) {
- logProperty(logger, Main.LOGBACK_CONFIGURATION_FILE_SYSTEM_PROPERTY);
- logProperty(logger, Configuration.PROPERTY_LOGGING_FILE_PATH);
- logProperty(logger, Configuration.PROPERTY_LOGGING_FILE_NAME);
- }
-
- return false;
- }
-
- private void logProperty(Logger logger, String propnm) {
- logger.info("eelf-feature: Property " + propnm + "=" + System.getProperty(propnm));
- }
-
- @Override
- public int getSequenceNumber() {
- return 0;
- }
+ @Override
+ public final boolean beforeBoot(PolicyEngine engine, String[] cliArgs) {
+
+ String logback = System.getProperty(Main.LOGBACK_CONFIGURATION_FILE_SYSTEM_PROPERTY,
+ Main.LOGBACK_CONFIGURATION_FILE_DEFAULT);
+ Path logbackPath = Paths.get(logback);
+
+ if (System.getProperty(Configuration.PROPERTY_LOGGING_FILE_PATH) == null) {
+ System.setProperty(Configuration.PROPERTY_LOGGING_FILE_PATH,
+ logbackPath.toAbsolutePath().getParent().toString());
+ }
+
+ if (System.getProperty(Configuration.PROPERTY_LOGGING_FILE_NAME) == null) {
+ System.setProperty(Configuration.PROPERTY_LOGGING_FILE_NAME,
+ logbackPath.getFileName().toString());
+ }
+
+ Logger logger = FlexLogger.getLogger(this.getClass(), true);
+
+ if (logger.isInfoEnabled()) {
+ logProperty(logger, Main.LOGBACK_CONFIGURATION_FILE_SYSTEM_PROPERTY);
+ logProperty(logger, Configuration.PROPERTY_LOGGING_FILE_PATH);
+ logProperty(logger, Configuration.PROPERTY_LOGGING_FILE_NAME);
+ }
+
+ return false;
+ }
+
+ private void logProperty(Logger logger, String propnm) {
+ logger.info("eelf-feature: Property " + propnm + "=" + System.getProperty(propnm));
+ }
+
+ @Override
+ public int getSequenceNumber() {
+ return 0;
+ }
}