aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChou, Joseph (JC2555) <jc2555@att.com>2018-03-28 13:46:11 -0400
committerChou, Joseph (JC2555) <jc2555@att.com>2018-03-28 13:50:53 -0400
commit5cd57949604803a32bd3a19c183eadf11f0ab900 (patch)
treef6799447752240bd654f337d5f66c397fd5fe3c4
parent669931e76de18aabb14f9ff873da4783f8c83d7a (diff)
ONAP code change for log files consolidation
Undo the change so this would not block other test activity Change-Id: I4f7dd2e14f30034eefbf958be3c912af2962e8a2 Issue-ID: POLICY-562 Signed-off-by: Chou, Joseph (JC2555) <jc2555@att.com>
-rw-r--r--BRMSGateway/src/main/resources/logback.xml8
-rw-r--r--ONAP-PAP-REST/src/main/resources/log4j.properties6
-rw-r--r--ONAP-PAP-REST/src/main/resources/logback.xml12
-rw-r--r--ONAP-PDP-REST/src/main/resources/log4j.properties6
-rw-r--r--ONAP-PDP-REST/src/main/resources/logback.xml12
-rw-r--r--ONAP-PDP/logging.properties2
-rw-r--r--ONAP-SDK-APP/src/main/resources/logback.xml9
-rw-r--r--PolicyEngineAPI/src/main/resources/logback.xml8
-rw-r--r--packages/base/src/files/etc/profile.d/env.sh2
-rw-r--r--packages/base/src/files/install/mysql/bin/cleanup_policy.sh8
-rw-r--r--packages/base/src/files/install/mysql/bin/db_backup.sh8
-rw-r--r--packages/base/src/files/install/mysql/bin/db_backup_data.sh8
-rw-r--r--packages/base/src/files/install/mysql/bin/db_backup_remote.sh9
-rw-r--r--packages/base/src/files/install/mysql/bin/db_restore.sh18
-rw-r--r--packages/base/src/files/install/mysql/bin/db_restore_data.sh7
-rw-r--r--packages/base/src/files/install/mysql/bin/db_upgrade.sh8
-rw-r--r--packages/base/src/files/install/mysql/bin/db_upgrade_remote.sh8
-rw-r--r--packages/base/src/files/install/servers/common/tomcat/conf/server.xml2
-rw-r--r--packages/base/src/files/install/servers/configs/conf/server.xml2
-rw-r--r--packages/base/src/files/install/servers/console/conf/server.xml2
-rw-r--r--packages/docker/src/main/docker/docker-install.sh7
-rw-r--r--packages/install/src/files/base.conf2
-rwxr-xr-xpackages/install/src/files/paplp.conf4
-rwxr-xr-xpackages/install/src/files/pdplp.conf4
24 files changed, 55 insertions, 107 deletions
diff --git a/BRMSGateway/src/main/resources/logback.xml b/BRMSGateway/src/main/resources/logback.xml
index b9a34d729..c01117ba7 100644
--- a/BRMSGateway/src/main/resources/logback.xml
+++ b/BRMSGateway/src/main/resources/logback.xml
@@ -21,15 +21,15 @@
<configuration scan="true" scanPeriod="3 seconds" debug="true">
<!--<jmxConfigurator /> -->
<!-- directory path for all other type logs -->
- <property name="logDir" value="${{POLICY_LOGS}}" />
+ <property name="logDir" value="logs" />
<!-- directory path for debugging type logs -->
- <property name="debugDir" value="${{POLICY_LOGS}}" />
+ <property name="debugDir" value="logs" />
<!-- specify the component name
<ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
- <property name="componentName" value="policy"></property>
- <property name="subComponentName" value="brmsgw"></property>
+ <property name="componentName" value="Policy"></property>
+ <property name="subComponentName" value="BRMSGateway"></property>
<!-- log file names -->
<property name="errorLogName" value="error" />
diff --git a/ONAP-PAP-REST/src/main/resources/log4j.properties b/ONAP-PAP-REST/src/main/resources/log4j.properties
index 7a1a6bea3..04f3233c1 100644
--- a/ONAP-PAP-REST/src/main/resources/log4j.properties
+++ b/ONAP-PAP-REST/src/main/resources/log4j.properties
@@ -28,7 +28,7 @@ log4j.rootLogger=INFO, FILE
# FILE appender
log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.FILE.File=${{POLICY_LOGS}}/policy/pap/pap-rest.log
+log4j.appender.FILE.File=${catalina.base}/logs/pap-rest.log
log4j.appender.FILE.ImmediateFlush=true
log4j.appender.FILE.Threshold=debug
log4j.appender.FILE.append=true
@@ -47,7 +47,7 @@ log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00
log4j.logger.xacml.request=INFO, REQUEST_LOG
log4j.appender.REQUEST_LOG=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.REQUEST_LOG.File=${{POLICY_LOGS}}/policy/pap/pap-rest-reqres.log
+log4j.appender.REQUEST_LOG.File=${catalina.base}/logs/pap-rest-reqres.log
log4j.appender.REQUEST_LOG.ImmediateFlush=true
log4j.appender.REQUEST_LOG.Threshold=debug
log4j.appender.REQUEST_LOG.append=true
@@ -63,7 +63,7 @@ log4j.logger.auditLogger=INFO,AUDIT_LOG
log4j.additivity.auditLogger=false
log4j.appender.AUDIT_LOG=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.AUDIT_LOG.File=${{POLICY_LOGS}}/policy/pap/audit.log
+log4j.appender.AUDIT_LOG.File=${catalina.base}/logs/audit.log
log4j.appender.AUDIT_LOG.Append=true
log4j.appender.AUDIT_LOG.DatePattern='.'yyyy-MM-dd
log4j.appender.AUDIT_LOG.threshold=INFO
diff --git a/ONAP-PAP-REST/src/main/resources/logback.xml b/ONAP-PAP-REST/src/main/resources/logback.xml
index 51656311e..3595b2432 100644
--- a/ONAP-PAP-REST/src/main/resources/logback.xml
+++ b/ONAP-PAP-REST/src/main/resources/logback.xml
@@ -21,15 +21,15 @@
<configuration scan="true" scanPeriod="3 seconds" debug="true">
<!--<jmxConfigurator /> -->
<!-- directory path for all other type logs -->
- <property name="logDir" value="${{POLICY_LOGS}}" />
+ <property name="logDir" value="logs" />
<!-- directory path for debugging type logs -->
- <property name="debugDir" value="${{POLICY_LOGS}}" />
+ <property name="debugDir" value="logs" />
<!-- specify the component name
<ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
- <property name="componentName" value="policy"></property>
- <property name="subComponentName" value="pap"></property>
+ <property name="componentName" value="Policy"></property>
+ <property name="subComponentName" value="ONAP-PAP-REST"></property>
<!-- log file names -->
<property name="errorLogName" value="error" />
@@ -84,8 +84,8 @@
<property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
-->
- <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
- <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
+ <property name="logDirectory" value="${catalina.base}/${logDir}/${componentName}/${subComponentName}" />
+ <property name="debugLogDirectory" value="${catalina.base}/${debugDir}/${componentName}/${subComponentName}" />
diff --git a/ONAP-PDP-REST/src/main/resources/log4j.properties b/ONAP-PDP-REST/src/main/resources/log4j.properties
index 5f5e4d5bc..6e5cfac93 100644
--- a/ONAP-PDP-REST/src/main/resources/log4j.properties
+++ b/ONAP-PDP-REST/src/main/resources/log4j.properties
@@ -28,7 +28,7 @@ log4j.rootLogger=INFO, FILE
# FILE appender
log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.FILE.File=${{POLICY_LOGS}}/policy/pdpx/pdp-rest.log
+log4j.appender.FILE.File=${catalina.base}/logs/pdp-rest.log
log4j.appender.FILE.ImmediateFlush=true
log4j.appender.FILE.Threshold=debug
log4j.appender.FILE.append=true
@@ -47,7 +47,7 @@ log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00
log4j.logger.xacml.request=INFO, REQUEST_LOG
log4j.appender.REQUEST_LOG=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.REQUEST_LOG.File=${{POLICY_LOGS}}/policy/pdpx/pdp-rest-reqres.log
+log4j.appender.REQUEST_LOG.File=${catalina.base}/logs/pdp-rest-reqres.log
log4j.appender.REQUEST_LOG.ImmediateFlush=true
log4j.appender.REQUEST_LOG.Threshold=debug
log4j.appender.REQUEST_LOG.append=true
@@ -63,7 +63,7 @@ log4j.logger.auditLogger=INFO,AUDIT_LOG
log4j.additivity.auditLogger=false
log4j.appender.AUDIT_LOG=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.AUDIT_LOG.File=${{POLICY_LOGS}}/policy/pdpx/audit.log
+log4j.appender.AUDIT_LOG.File=${catalina.base}/logs/audit.log
log4j.appender.AUDIT_LOG.Append=true
log4j.appender.AUDIT_LOG.DatePattern='.'yyyy-MM-dd
log4j.appender.AUDIT_LOG.threshold=INFO
diff --git a/ONAP-PDP-REST/src/main/resources/logback.xml b/ONAP-PDP-REST/src/main/resources/logback.xml
index 6e4064dfc..677b0d0d7 100644
--- a/ONAP-PDP-REST/src/main/resources/logback.xml
+++ b/ONAP-PDP-REST/src/main/resources/logback.xml
@@ -21,15 +21,15 @@
<configuration scan="true" scanPeriod="3 seconds" debug="true">
<!--<jmxConfigurator /> -->
<!-- directory path for all other type logs -->
- <property name="logDir" value="${{POLICY_LOGS}}" />
+ <property name="logDir" value="logs" />
<!-- directory path for debugging type logs -->
- <property name="debugDir" value="${{POLICY_LOGS}}" />
+ <property name="debugDir" value="logs" />
<!-- specify the component name
<ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
- <property name="componentName" value="policy"></property>
- <property name="subComponentName" value="pdpx"></property>
+ <property name="componentName" value="Policy"></property>
+ <property name="subComponentName" value="ONAP-PDP-REST"></property>
<!-- log file names -->
<property name="errorLogName" value="error" />
@@ -83,8 +83,8 @@
<property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
-->
- <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
- <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
+ <property name="logDirectory" value="${catalina.base}/${logDir}/${componentName}/${subComponentName}" />
+ <property name="debugLogDirectory" value="${catalina.base}/${debugDir}/${componentName}/${subComponentName}" />
diff --git a/ONAP-PDP/logging.properties b/ONAP-PDP/logging.properties
index e6f11bda4..d25697ea8 100644
--- a/ONAP-PDP/logging.properties
+++ b/ONAP-PDP/logging.properties
@@ -24,6 +24,6 @@ handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.FileHandler.level = INFO
-java.util.logging.FileHandler.pattern=${{POLICY_LOGS}/policy/pdpx/xacml_log%u.log
+java.util.logging.FileHandler.pattern=%h/xacml_log%u.log
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
diff --git a/ONAP-SDK-APP/src/main/resources/logback.xml b/ONAP-SDK-APP/src/main/resources/logback.xml
index 8e99b0a15..d19b1ba5a 100644
--- a/ONAP-SDK-APP/src/main/resources/logback.xml
+++ b/ONAP-SDK-APP/src/main/resources/logback.xml
@@ -28,16 +28,15 @@
<!--<jmxConfigurator /> -->
<!-- specify the component name -->
- <property name="componentName" value="policy"></property>
- <property name="subComponentName" value="epsdk"></property>
+ <property name="componentName" value="epsdk_app_os"></property>
<!-- specify the base path of the log directory -->
- <property name="logDirPrefix" value="${{POLICY_LOGS}}"></property>
+ <property name="logDirPrefix" value="${catalina.base}/logs"></property>
<!-- The directories where logs are written -->
- <property name="logDirectory" value="${logDirPrefix}/${componentName}/${subComponentName}" />
+ <property name="logDirectory" value="${logDirPrefix}/${componentName}" />
<!-- Can easily relocate debug logs by modifying this path. -->
- <property name="debugLogDirectory" value="${logDirPrefix}/${componentName}/${subComponentName}" />
+ <property name="debugLogDirectory" value="${logDirPrefix}/${componentName}" />
<!-- log file names -->
<property name="generalLogName" value="application" />
diff --git a/PolicyEngineAPI/src/main/resources/logback.xml b/PolicyEngineAPI/src/main/resources/logback.xml
index e69f01dd2..347466bcc 100644
--- a/PolicyEngineAPI/src/main/resources/logback.xml
+++ b/PolicyEngineAPI/src/main/resources/logback.xml
@@ -21,15 +21,15 @@
<configuration scan="true" scanPeriod="3 seconds" debug="true">
<!--<jmxConfigurator /> -->
<!-- directory path for all other type logs -->
- <property name="logDir" value="${{POLICY_LOGS}}" />
+ <property name="logDir" value="logs" />
<!-- directory path for debugging type logs -->
- <property name="debugDir" value="${{POLICY_LOGS}}" />
+ <property name="debugDir" value="logs" />
<!-- specify the component name
<ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
- <property name="componentName" value="policy"></property>
- <property name="subComponentName" value="api"></property>
+ <property name="componentName" value="Policy"></property>
+ <property name="subComponentName" value="PolicyEngineAPI"></property>
<!-- log file names -->
<property name="errorLogName" value="error" />
diff --git a/packages/base/src/files/etc/profile.d/env.sh b/packages/base/src/files/etc/profile.d/env.sh
index 14445fbfd..56b44260b 100644
--- a/packages/base/src/files/etc/profile.d/env.sh
+++ b/packages/base/src/files/etc/profile.d/env.sh
@@ -25,5 +25,3 @@ export KEYSTORE_PASSWD=${{KEYSTORE_PASSWD}}
export JAVA_HOME=${{JAVA_HOME}}
export PATH=${PATH}:${{POLICY_HOME}}/bin
-
-export POLICY_LOGS=${{POLICY_LOGS}} \ No newline at end of file
diff --git a/packages/base/src/files/install/mysql/bin/cleanup_policy.sh b/packages/base/src/files/install/mysql/bin/cleanup_policy.sh
index 969d089c0..1841d3c57 100644
--- a/packages/base/src/files/install/mysql/bin/cleanup_policy.sh
+++ b/packages/base/src/files/install/mysql/bin/cleanup_policy.sh
@@ -71,12 +71,8 @@ function cleanup_deleted_policy
}
# MAIN
-if [ -z ${POLICY_LOGS} ]; then
- POLICY_LOGS=/var/log/onap
-fi
-mkdir -p $POLICY_LOGS/policy/db
-LOG=$POLICY_LOGS/policy/db/cleanup_policy_$DATE.log
-ERR=$POLICY_LOGS/policy/db/cleanup_policy_$DATE.err
+LOG=$POLICY_HOME/logs/cleanup_policy_$DATE.log
+ERR=$POLICY_HOME/logs/cleanup_policy_$DATE.err
echo "cleanup_policy.sh started ... `date`" | tee -a $LOG
if [ $# -eq 3 ]; then
DB_USER="${1}"
diff --git a/packages/base/src/files/install/mysql/bin/db_backup.sh b/packages/base/src/files/install/mysql/bin/db_backup.sh
index 75d15364f..dca2017ff 100644
--- a/packages/base/src/files/install/mysql/bin/db_backup.sh
+++ b/packages/base/src/files/install/mysql/bin/db_backup.sh
@@ -63,12 +63,6 @@ function backup_database
# MAIN
-if [ -z ${POLICY_LOGS} ]; then
- POLICY_LOGS=/var/log/onap
-fi
-mkdir -p $POLICY_LOGS/policy/db
-LOG=$POLICY_LOGS/policy/db/db_backup_$DATE.log
-ERR=$POLICY_LOGS/policy/db/db_backup_$DATE.err
echo "db_backup.sh started ... `date`" | tee -a $LOG
if [ $# -eq 3 ]; then
DB_USER="${1}"
@@ -77,6 +71,8 @@ if [ $# -eq 3 ]; then
echo "DB_USER: $DB_USER" | tee -a $LOG
DAILY_BACKUP_DIR=$POLICY_HOME/data/mysql/$DATE
+ LOG=$POLICY_HOME/logs/db_backup_$DATE.log
+ ERR=$POLICY_HOME/logs/db_backup_$DATE.err
create_backup_dir
backup_database
diff --git a/packages/base/src/files/install/mysql/bin/db_backup_data.sh b/packages/base/src/files/install/mysql/bin/db_backup_data.sh
index b77885e7d..ee0b44732 100644
--- a/packages/base/src/files/install/mysql/bin/db_backup_data.sh
+++ b/packages/base/src/files/install/mysql/bin/db_backup_data.sh
@@ -63,12 +63,8 @@ function backup_database
# MAIN
-if [ -z ${POLICY_LOGS} ]; then
- POLICY_LOGS=/var/log/onap
-fi
-mkdir -p $POLICY_LOGS/onap/policy/db
-LOG=$POLICY_LOGS/policy/db/db_backup_data_$DATE.log
-ERR=$POLICY_LOGS/policy/db/db_backup_data_$DATE.err
+LOG=$POLICY_HOME/logs/db_backup_data_$DATE.log
+ERR=$POLICY_HOME/logs/db_backup_data_$DATE.err
echo "db_backup_data.sh started ... `date`" | tee -a $LOG
if [ $# -eq 3 ]; then
DB_USER="${1}"
diff --git a/packages/base/src/files/install/mysql/bin/db_backup_remote.sh b/packages/base/src/files/install/mysql/bin/db_backup_remote.sh
index 72f31c33a..212896942 100644
--- a/packages/base/src/files/install/mysql/bin/db_backup_remote.sh
+++ b/packages/base/src/files/install/mysql/bin/db_backup_remote.sh
@@ -70,19 +70,14 @@ if [ $# -eq 4 ]; then
DB_PASSWORD="${2}"
DATABASE="${3}"
DB_HOSTNAME="${4}"
- if [ -z ${POLICY_LOGS} ]; then
- POLICY_LOGS=/var/log/onap
- fi
- mkdir -p $POLICY_LOGS/policy/db
- LOG=$POLICY_LOGS/policy/db/db_backup_remote_$DATE.log
- ERR=$POLICY_LOGS/policy/db/db_backup_remote_$DATE.err
-
echo "db_backup_remote.sh for [$DATABASE]@[${DB_HOSTNAME}] started ... `date`" | tee -a $LOG
echo "DB_USER : $DB_USER" | tee -a $LOG
echo "DATABASE : $DATABASE" | tee -a $LOG
echo "DB_HOSTNAME: $DB_HOSTNAME" | tee -a $LOG
DAILY_BACKUP_DIR=$POLICY_HOME/data/mysql/$DATE
+ LOG=$POLICY_HOME/logs/db_backup_remote_$DATE.log
+ ERR=$POLICY_HOME/logs/db_backup_remote_$DATE.err
create_backup_dir
backup_database
diff --git a/packages/base/src/files/install/mysql/bin/db_restore.sh b/packages/base/src/files/install/mysql/bin/db_restore.sh
index 765b0cad3..0f63535c7 100644
--- a/packages/base/src/files/install/mysql/bin/db_restore.sh
+++ b/packages/base/src/files/install/mysql/bin/db_restore.sh
@@ -38,8 +38,6 @@ BACKUP_FILE=""
DATABASE=""
TABLE=""
TEMP_FILE=/tmp/db_restore_$$.sql
-DATE=`date +"%Y%m%d"`
-LOG=""
function restore_all
{
@@ -56,7 +54,7 @@ function restore_table
{
database="${1}"
table="${2}"
- echo "restore_table [$database] [$table] started ...@`date`" | tee -a $LOG
+ echo "restore_table [$database] [$table] started ...@`date`"
# extract sql statement from backup file
echo "use $database;" > $TEMP_FILE
echo "set foreign_key_checks=0; " >> $TEMP_FILE
@@ -68,18 +66,12 @@ function restore_table
echo "Before restore table ..." | tee -a $LOG
mysql -u${DB_USER} -p${DB_PASSWORD} < $TEMP_FILE
echo "--"
- echo "restore_table [$database] [$table] completed ...@`date`" | tee -a $LOG
+ echo "restore_table [$database] [$table] completed ...@`date`"
}
# MAIN
-if [ -z ${POLICY_LOGS} ]; then
- POLICY_LOGS=/var/log/onap
-fi
-mkdir -p $POLICY_LOGS/policy/db
-LOG=$POLICY_LOGS/policy/db/db_restore_$DATE.log
-
-echo "db_restore.sh started ... `date`" | tee -a $LOG
+echo "db_restore.sh started ... `date`"
if [ $# -eq 5 ]; then
DB_USER="${1}"
DB_PASSWORD="${2}"
@@ -94,7 +86,7 @@ if [ $# -eq 5 ]; then
restore_all
fi
else
- echo "BACKUP FILE NOT FOUND: $BACKUP_FILE" | tee -a $LOG
+ echo "BACKUP FILE NOT FOUND: $BACKUP_FILE"
fi
else
echo "Usage : db_restore.sh db_user_id db_password backup_file database table_name"
@@ -102,4 +94,4 @@ else
fi
rm -f $TEMP_FILE
-echo "db_restore.sh completed ... `date`" | tee -a $LOG
+echo "db_restore.sh completed ... `date`"
diff --git a/packages/base/src/files/install/mysql/bin/db_restore_data.sh b/packages/base/src/files/install/mysql/bin/db_restore_data.sh
index ec0874a67..c4fec027f 100644
--- a/packages/base/src/files/install/mysql/bin/db_restore_data.sh
+++ b/packages/base/src/files/install/mysql/bin/db_restore_data.sh
@@ -40,8 +40,6 @@ BACKUP_FILE=""
DATABASE=""
TABLE=""
TEMP_FILE=/tmp/db_restore_data_$$.sql
-DATE=`date +"%Y%m%d"`
-LOG=""
function restore_all
{
@@ -87,11 +85,6 @@ if [ $# -eq 5 ]; then
typeset -l DATABASE="${4}"
typeset -l TABLE="${5}"
echo "DB_USER: $DB_USER"
- if [ -z ${POLICY_LOGS} ]; then
- POLICY_LOGS=/var/log/onap
- fi
- mkdir -p $POLICY_LOGS/policy/db
- LOG=$POLICY_LOGS/policy/db/db_restore_data_$DATE.log
if [ -f $BACKUP_FILE ]; then
if [ "${TABLE}" != "all" ]; then
restore_table ${DATABASE} ${TABLE}
diff --git a/packages/base/src/files/install/mysql/bin/db_upgrade.sh b/packages/base/src/files/install/mysql/bin/db_upgrade.sh
index 85a9218f5..87d5d9bd7 100644
--- a/packages/base/src/files/install/mysql/bin/db_upgrade.sh
+++ b/packages/base/src/files/install/mysql/bin/db_upgrade.sh
@@ -124,12 +124,8 @@ function check_directory
# MAIN
#check_directory
-if [ -z ${POLICY_LOGS} ]; then
- POLICY_LOGS=/var/log/onap
-fi
-mkdir -p $POLICY_LOGS/policy/db
-LOG=$POLICY_LOGS/policy/db/db_upgrade_$DATE.log
-ERR=$POLICY_LOGS/policy/db/db_upgrade_$DATE.err
+LOG=$POLICY_HOME/logs/db_upgrade_$DATE.log
+ERR=$POLICY_HOME/logs/db_upgrade_$DATE.err
echo "db_upgrade.sh started ..." | tee -a $LOG
if [ $# -eq 3 ]; then
TARGET_RELEASE="${1}"
diff --git a/packages/base/src/files/install/mysql/bin/db_upgrade_remote.sh b/packages/base/src/files/install/mysql/bin/db_upgrade_remote.sh
index c4316816e..a10ac2173 100644
--- a/packages/base/src/files/install/mysql/bin/db_upgrade_remote.sh
+++ b/packages/base/src/files/install/mysql/bin/db_upgrade_remote.sh
@@ -146,12 +146,8 @@ function check_directory
# MAIN
#check_directory
-if [ -z ${POLICY_LOGS} ]; then
- POLICY_LOGS=/var/log/onap
-fi
-mkdir -p $POLICY_LOGS/policy/db
-LOG=$POLICY_LOGS/policy/db/db_upgrade_remote_$DATE.log
-ERR=$POLICY_LOGS/policy/db/db_upgrade_remote_$DATE.err
+LOG=$POLICY_HOME/logs/db_upgrade_remote_$DATE.log
+ERR=$POLICY_HOME/logs/db_upgrade_remote_$DATE.err
echo "db_upgrade_remote.sh started ..." | tee -a $LOG
if [ $# -eq 3 ]; then
DB_UPGRADE_USER="${1}"
diff --git a/packages/base/src/files/install/servers/common/tomcat/conf/server.xml b/packages/base/src/files/install/servers/common/tomcat/conf/server.xml
index 0aca4ead7..787347283 100644
--- a/packages/base/src/files/install/servers/common/tomcat/conf/server.xml
+++ b/packages/base/src/files/install/servers/common/tomcat/conf/server.xml
@@ -157,7 +157,7 @@
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="/var/log/onap/policy"
+ <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
diff --git a/packages/base/src/files/install/servers/configs/conf/server.xml b/packages/base/src/files/install/servers/configs/conf/server.xml
index a9bf21bbe..2a6191e99 100644
--- a/packages/base/src/files/install/servers/configs/conf/server.xml
+++ b/packages/base/src/files/install/servers/configs/conf/server.xml
@@ -159,7 +159,7 @@
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="/var/log/onap/policy"
+ <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
diff --git a/packages/base/src/files/install/servers/console/conf/server.xml b/packages/base/src/files/install/servers/console/conf/server.xml
index b3fa674b0..53d563bba 100644
--- a/packages/base/src/files/install/servers/console/conf/server.xml
+++ b/packages/base/src/files/install/servers/console/conf/server.xml
@@ -162,7 +162,7 @@
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="/var/log/onap/policy/console"
+ <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
diff --git a/packages/docker/src/main/docker/docker-install.sh b/packages/docker/src/main/docker/docker-install.sh
index c15f36f38..e8b9aaf14 100644
--- a/packages/docker/src/main/docker/docker-install.sh
+++ b/packages/docker/src/main/docker/docker-install.sh
@@ -151,7 +151,6 @@ function configure_component() {
SED_LINE+=" -e 's!\${{KEYSTORE_PASSWD}}!${KEYSTORE_PASSWD}!g' "
SED_LINE+=" -e 's!\${{JAVA_HOME}}!${JAVA_HOME}!g' "
SED_LINE+=" -e 's!\${{COMPONENT_TYPE}}!${COMPONENT_TYPE}!g' "
- SED_LINE+=" -e 's!\${{POLICY_LOGS}}!${POLICY_LOGS}!g' "
while read line || [ -n "${line}" ]; do
if [[ -n $line ]] && [[ $line != \#* ]]; then
@@ -659,12 +658,6 @@ if [[ -z ${POLICY_GROUP} ]]; then
exit 1
fi
-if [[ -z ${POLICY_LOGS} ]]; then
- echo "POLICY_LOGS environment variable NOT set, default to /var/log"
- export POLICY_LOGS="/var/log/onap"
-fi
-
-
FQDN=$(hostname -f 2> /dev/null)
if [[ $? != 0 || -z ${FQDN} ]]; then
echo "error: cannot determine the FQDN for this host $(hostname)."
diff --git a/packages/install/src/files/base.conf b/packages/install/src/files/base.conf
index a64cd3ee7..cd08d4a41 100644
--- a/packages/install/src/files/base.conf
+++ b/packages/install/src/files/base.conf
@@ -17,5 +17,3 @@ max_fpc_update_interval=60
test_via_jmx=false
ENVIRONMENT=TEST
-
-POLICY_LOGS=/var/log/onap \ No newline at end of file
diff --git a/packages/install/src/files/paplp.conf b/packages/install/src/files/paplp.conf
index ec7578be7..f5a6d096b 100755
--- a/packages/install/src/files/paplp.conf
+++ b/packages/install/src/files/paplp.conf
@@ -4,8 +4,8 @@ LOGPARSER_X_MS_MB=1024
LOGPARSER_X_MX_MB=1024
SERVER=https://${{FQDN}}:9091/pap/
-LOGPATH=${{POLICY_LOGS}}/policy/pap/pap-rest.log
-PARSERLOGPATH=${{POLICY_LOGS}}/policy/pap/IntegrityMonitor.log
+LOGPATH=${{POLICY_HOME}}/servers/pap/logs/pap-rest.log
+PARSERLOGPATH=IntegrityMonitor.log
node_type=logparser
# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase
diff --git a/packages/install/src/files/pdplp.conf b/packages/install/src/files/pdplp.conf
index f791a3f79..716326c56 100755
--- a/packages/install/src/files/pdplp.conf
+++ b/packages/install/src/files/pdplp.conf
@@ -4,8 +4,8 @@ LOGPARSER_X_MS_MB=1024
LOGPARSER_X_MX_MB=1024
SERVER=https://${{FQDN}}:8081/pdp/
-LOGPATH=${{POLICY_LOGS}}/policy/pdpx/pdp-rest.log
-PARSERLOGPATH==${{POLICY_LOGS}}/policy/pdpx/IntegrityMonitor.log
+LOGPATH=${{POLICY_HOME}}/servers/pdp/logs/pdp-rest.log
+PARSERLOGPATH==IntegrityMonitor.log
node_type=logparser
# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase