From 3cc07c90f703ef24ff04c112172ecf69d5b644f9 Mon Sep 17 00:00:00 2001 From: jhh Date: Tue, 1 Mar 2022 14:49:08 -0600 Subject: Remove features-session-persistence and eelf These are unused. Issue-ID: POLICY-3922 Signed-off-by: jhh Change-Id: I9ef6af27d4d5ed5667a60db841a82b4d492f79f4 --- .../src/main/feature/config/logback-eelf.xml | 184 --------------------- feature-eelf/src/main/feature/install/disable | 33 ---- feature-eelf/src/main/feature/install/enable | 35 ---- .../org/onap/policy/drools/eelf/EelfFeature.java | 73 -------- ...p.policy.drools.features.PolicyEngineFeatureApi | 1 - 5 files changed, 326 deletions(-) delete mode 100644 feature-eelf/src/main/feature/config/logback-eelf.xml delete mode 100644 feature-eelf/src/main/feature/install/disable delete mode 100644 feature-eelf/src/main/feature/install/enable delete mode 100644 feature-eelf/src/main/java/org/onap/policy/drools/eelf/EelfFeature.java delete mode 100644 feature-eelf/src/main/resources/META-INF/services/org.onap.policy.drools.features.PolicyEngineFeatureApi (limited to 'feature-eelf/src/main') diff --git a/feature-eelf/src/main/feature/config/logback-eelf.xml b/feature-eelf/src/main/feature/config/logback-eelf.xml deleted file mode 100644 index 7acd33fa..00000000 --- a/feature-eelf/src/main/feature/config/logback-eelf.xml +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - ${defaultPattern} - - - - - ${logDirectory}/${auditLogName}.log - - ${logDirectory}/${auditLogName}.%i.log.zip - - 1 - 5 - - - 10MB - - - ${defaultAuditPattern} - - - - - - - - - ${logDirectory}/${metricsLogName}.log - - ${logDirectory}/${metricsLogName}.%i.log.zip - - 1 - 5 - - - 15MB - - - ${defaultMetricPattern} - - - - - - - - - - ${logDirectory}/${errorLogName}.log - - ${logDirectory}/${errorLogName}.%i.log.zip - - 1 - 5 - - - ERROR - - - 20MB - - - ${defaultErrorPattern} - - - - - - - - - ${debugLogDirectory}/${debugLogName}.log - - ${debugLogDirectory}/${debugLogName}.%i.log.zip - - 1 - 5 - - - 20MB - - - ${debugPattern} - - - - - - - - - ${logDirectory}/${networkLogName}.log - - ${logDirectory}/${networkLogName}.%i.log.zip - - 1 - 5 - - - 15MB - - - ${networkPattern} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/feature-eelf/src/main/feature/install/disable b/feature-eelf/src/main/feature/install/disable deleted file mode 100644 index eb4e0fac..00000000 --- a/feature-eelf/src/main/feature/install/disable +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env sh - -### -# ============LICENSE_START======================================================= -# ONAP POLICY -# ================================================================================ -# Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -## - -if [ "${DEBUG}" = "y" ]; then - set -x -fi - -SYSTEM_PROPS="${POLICY_HOME}"/config/system.properties - -if [ -f "${SYSTEM_PROPS}" ] && [ -r "${SYSTEM_PROPS}" ]; then - if grep -q "^logback.configurationFile=.*$" "${SYSTEM_PROPS}"; then - sed -i -e "s|^logback.configurationFile=.*$|logback.configurationFile=config/logback.xml|" "${SYSTEM_PROPS}" - fi -fi diff --git a/feature-eelf/src/main/feature/install/enable b/feature-eelf/src/main/feature/install/enable deleted file mode 100644 index 50cd9c1e..00000000 --- a/feature-eelf/src/main/feature/install/enable +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env sh - -### -# ============LICENSE_START======================================================= -# ONAP POLICY -# ================================================================================ -# Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved. -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============LICENSE_END========================================================= -## - -if [ "${DEBUG}" = "y" ]; then - set -x -fi - -SYSTEM_PROPS="${POLICY_HOME}"/config/system.properties - -if [ -f "${SYSTEM_PROPS}" ] && [ -r "${SYSTEM_PROPS}" ]; then - if grep -q "^logback.configurationFile=.*$" "${SYSTEM_PROPS}"; then - sed -i -e "s|^logback.configurationFile=.*$|logback.configurationFile=config/logback-eelf.xml|" "${SYSTEM_PROPS}" - else - echo "logback.configurationFile=config/logback-eelf.xml" >> "${SYSTEM_PROPS}" - fi -fi 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 deleted file mode 100644 index 58679d48..00000000 --- a/feature-eelf/src/main/java/org/onap/policy/drools/eelf/EelfFeature.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * feature-eelf - * ================================================================================ - * Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.drools.eelf; - -import com.att.eelf.configuration.Configuration; -import java.nio.file.Paths; -import org.onap.policy.common.logging.flexlogger.FlexLogger; -import org.onap.policy.common.logging.flexlogger.Logger; -import org.onap.policy.drools.features.PolicyEngineFeatureApi; -import org.onap.policy.drools.system.PolicyEngine; -import org.onap.policy.drools.utils.logging.LoggerUtil; - -/** - * Feature EELF : Enables EELF Logging Libraries . - */ -public class EelfFeature implements PolicyEngineFeatureApi { - - @Override - public final boolean beforeBoot(PolicyEngine engine, String[] cliArgs) { - - String logback = System.getProperty(LoggerUtil.LOGBACK_CONFIGURATION_FILE_SYSTEM_PROPERTY, - LoggerUtil.LOGBACK_CONFIGURATION_FILE_DEFAULT); - var 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()); - } - - var logger = FlexLogger.getLogger(this.getClass(), true); - - if (logger.isInfoEnabled()) { - logProperty(logger, LoggerUtil.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; - } - -} diff --git a/feature-eelf/src/main/resources/META-INF/services/org.onap.policy.drools.features.PolicyEngineFeatureApi b/feature-eelf/src/main/resources/META-INF/services/org.onap.policy.drools.features.PolicyEngineFeatureApi deleted file mode 100644 index f2bcc4cb..00000000 --- a/feature-eelf/src/main/resources/META-INF/services/org.onap.policy.drools.features.PolicyEngineFeatureApi +++ /dev/null @@ -1 +0,0 @@ -org.onap.policy.drools.eelf.EelfFeature -- cgit 1.2.3-korg