aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-09-20 11:04:00 -0400
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-09-20 11:08:27 -0400
commitc4347b25ddf03c4f8e25b9443e0e25be102d0ba6 (patch)
tree50602a362db32978814e185d84227634418215b1 /packages
parent19659e205ef636cec767e32a62cc549cf9156d5b (diff)
Update Logging
Update logging to meet Casablanca Spec Change-Id: I029d6c63765992d6f091d96e2b4c34c60d30c484 Issue-ID: SO-947 Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
Diffstat (limited to 'packages')
-rw-r--r--packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml312
-rwxr-xr-xpackages/docker/src/main/docker/docker-files/scripts/start-jboss-server.sh58
2 files changed, 172 insertions, 198 deletions
diff --git a/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml b/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml
index 5c8894300f..89482fdcda 100644
--- a/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml
+++ b/packages/docker/src/main/docker/docker-files/configs/logging/logback-spring.xml
@@ -10,32 +10,36 @@
language governing permissions and limitations under the License. ============LICENSE_END========================================================= -->
<configuration scan="true" debug="false">
- <contextListener class="org.onap.so.logger.LoggerStartupListener" />
- <include resource="org/springframework/boot/logging/logback/base.xml" />
+ <contextListener class="org.onap.so.logger.LoggerStartupListener" />
+ <include resource="org/springframework/boot/logging/logback/defaults.xml" />
- <property name="queueSize" value="256" />
- <property name="maxFileSize" value="200MB" />
- <property name="maxHistory" value="30" />
- <property name="totalSizeCap" value="10GB" />
+ <property name="queueSize" value="256" />
+ <property name="maxFileSize" value="200MB" />
+ <property name="maxHistory" value="30" />
+ <property name="totalSizeCap" value="10GB" />
- <!-- log file names -->
- <property name="errorLogName" value="error" />
- <property name="metricsLogName" value="metrics" />
- <property name="auditLogName" value="audit" />
- <property name="debugLogName" value="debug" />
- <property name="saneLogName" value="sane" />
+ <!-- log file names -->
+ <property name="errorLogName" value="error" />
+ <property name="metricsLogName" value="metrics" />
+ <property name="auditLogName" value="audit" />
+ <property name="debugLogName" value="debug" />
+
+ <property name="currentTimeStamp" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;,UTC}"/>
- <property name="errorPattern"
- value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" />
+ <property name="errorPattern"
+ value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" />
- <property name="auditPattern"
- value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||||||%msg%n" />
+ <property name="debugPattern"
+ value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}| %logger{50} - %msg%n" />
- <property name="metricPattern"
- value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|||||%msg%n" />
+ <property name="auditPattern"
+ value="%X{EntryTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||||||%msg%n" />
- <property name="defaultPattern"
- value="%nopexception%logger
+ <property name="metricPattern"
+ value="%X{InvokeTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|||||%msg%n" />
+
+ <property name="defaultPattern"
+ value="%nopexception%logger
\t%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}
\t%level
\t%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'}
@@ -45,123 +49,151 @@
\t%thread
\t%n" />
- <appender name="Audit"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logs_dir:-.}/${auditLogName}.log</file>
- <rollingPolicy
- class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logs_dir:-.}/${auditLogName}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>${maxFileSize}</maxFileSize>
- <maxHistory>${maxHistory}</maxHistory>
- <totalSizeCap>${totalSizeCap}</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${auditPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="asyncAudit" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize>
- <appender-ref ref="Audit" />
- </appender>
-
- <appender name="Metric"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logs_dir:-.}/${metricsLogName}.log</file>
- <rollingPolicy
- class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logs_dir:-.}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>${maxFileSize}</maxFileSize>
- <maxHistory>${maxHistory}</maxHistory>
- <totalSizeCap>${totalSizeCap}</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${metricPattern}</pattern>
- </encoder>
- </appender>
-
-
- <appender name="asyncMetric" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize>
- <appender-ref ref="Metric" />
- </appender>
-
- <appender name="Error"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <filter class="ch.qos.logback.classic.filter.LevelFilter">
- <level>ERROR</level>
- <onMatch>ACCEPT</onMatch>
- <onMismatch>DENY</onMismatch>
- </filter>
- <file>${logs_dir:-.}/${errorLogName}.log</file>
- <rollingPolicy
- class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logs_dir:-.}/${errorLogName}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>${maxFileSize}</maxFileSize>
- <maxHistory>${maxHistory}</maxHistory>
- <totalSizeCap>${totalSizeCap}</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${errorPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="asyncError" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize>
- <appender-ref ref="Error" />
- </appender>
-
- <appender name="Debug"
- class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logs_dir:-.}/${debugLogName}.log</file>
- <rollingPolicy
- class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logs_dir:-.}/${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>${maxFileSize}</maxFileSize>
- <maxHistory>${maxHistory}</maxHistory>
- <totalSizeCap>${totalSizeCap}</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${defaultPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="asyncDebug" class="ch.qos.logback.classic.AsyncAppender">
- <queueSize>256</queueSize>
- <appender-ref ref="Debug" />
- <includeCallerData>true</includeCallerData>
- </appender>
-
- <!-- Spring related loggers -->
- <logger name="org.springframework" level="WARN" />
-
- <!-- Camunda related loggers -->
- <logger name="org.camunda.bpm.engine.jobexecutor.level" level="WARN" />
- <logger
- name="org.camunda.bpm.engine.impl.persistence.entity.JobEntity.level"
- level="WARN" />
-
- <logger name="db.migration" level="DEBUG" />
- <logger name="org.apache.wire" level="DEBUG" />
- <logger name="org.onap" level="DEBUG" />
- <logger name="com.att.ecomp" level="DEBUG" />
- <logger name="org.apache.cxf" level="INFO" />
-
- <logger name="AUDIT" level="INFO" additivity="false">
- <appender-ref ref="asyncAudit" />
- </logger>
-
- <logger name="METRIC" level="INFO" additivity="false">
- <appender-ref ref="asyncMetric" />
- </logger>
-
- <root level="WARN">
- <appender-ref ref="asyncDebug" />
- <appender-ref ref="asyncError" />
- </root>
-
-</configuration>
+ <appender name="Audit"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>EXIT</marker>
+ </evaluator>
+ <onMismatch>DENY</onMismatch>
+ <onMatch>ACCEPT</onMatch>
+ </filter>
+ <file>${logs_dir:-.}/${auditLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logs_dir:-.}/${auditLogName}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${auditPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncAudit" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="Audit" />
+ </appender>
+
+ <appender name="Metric"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>INVOKE_RETURN</marker>
+ </evaluator>
+ <onMismatch>DENY</onMismatch>
+ <onMatch>ACCEPT</onMatch>
+ </filter>
+ <file>${logs_dir:-.}/${metricsLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logs_dir:-.}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${metricPattern}</pattern>
+ </encoder>
+ </appender>
+
+
+ <appender name="asyncMetric" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="Metric" />
+ </appender>
+
+ <appender name="Error"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <filter class="ch.qos.logback.classic.filter.LevelFilter">
+ <level>ERROR</level>
+ <onMatch>ACCEPT</onMatch>
+ <onMismatch>DENY</onMismatch>
+ </filter>
+ <file>${logs_dir:-.}/${errorLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logs_dir:-.}/${errorLogName}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${errorPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncError" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="Error" />
+ </appender>
+
+ <appender name="Debug"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>INVOKE</marker>
+ <marker>INVOKE_RETURN</marker>
+ <marker>ENTRY</marker>
+ <marker>EXIT</marker>
+ </evaluator>
+ <onMismatch>ACCEPT</onMismatch>
+ <onMatch>DENY</onMatch>
+ </filter>
+ <file>${logs_dir:-.}/${debugLogName}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logs_dir:-.}/${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>${maxFileSize}</maxFileSize>
+ <maxHistory>${maxHistory}</maxHistory>
+ <totalSizeCap>${totalSizeCap}</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${debugPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="asyncDebug" class="ch.qos.logback.classic.AsyncAppender">
+ <queueSize>256</queueSize>
+ <appender-ref ref="Debug" />
+ <includeCallerData>true</includeCallerData>
+ </appender>
+
+ <!-- Spring related loggers -->
+ <logger name="org.springframework" level="WARN" />
+ <logger
+ name="org.springframework.security.authentication.dao.DaoAuthenticationProvider"
+ level="DEBUG" />
+
+ <!-- Camunda related loggers -->
+ <logger name="org.camunda.bpm.engine.jobexecutor.level" level="WARN" />
+ <logger
+ name="org.camunda.bpm.engine.impl.persistence.entity.JobEntity.level"
+ level="WARN" />
+
+ <logger name="org.apache.wire" level="DEBUG" />
+ <logger name="org.onap" level="DEBUG" />
+ <logger name="com.att.ecomp" level="DEBUG" />
+ <logger name="org.apache.cxf.interceptor" level="DEBUG" />
+
+ <logger name="AUDIT" level="INFO" additivity="false">
+ <appender-ref ref="asyncAudit" />
+ </logger>
+
+ <logger name="METRIC" level="INFO" additivity="false">
+ <appender-ref ref="asyncMetric" />
+ </logger>
+
+ <root level="WARN">
+ <appender-ref ref="asyncDebug" />
+ <appender-ref ref="asyncError" />
+ <appender-ref ref="asyncAudit" />
+ <appender-ref ref="asyncMetric" />
+ </root>
+
+</configuration> \ No newline at end of file
diff --git a/packages/docker/src/main/docker/docker-files/scripts/start-jboss-server.sh b/packages/docker/src/main/docker/docker-files/scripts/start-jboss-server.sh
deleted file mode 100755
index 1a38fff899..0000000000
--- a/packages/docker/src/main/docker/docker-files/scripts/start-jboss-server.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-# Copyright 2015 AT&T Intellectual Properties
-##############################################################################
-# Script to initialize the chef-repo branch and.chef
-#
-##############################################################################
-# Copy the certificates
-echo 'Copying the *.crt provided in /shared folder'
-cp --verbose /shared/*.crt /usr/local/share/ca-certificates
-update-ca-certificates --fresh
-
-echo 'Running in JBOSS'
-su - jboss
-
-#Start the chef-solo if mso-docker.json contains some data.
-if [ -s /var/berks-cookbooks/${CHEF_REPO_NAME}/environments/mso-docker.json ]
-then
- echo "mso-docker.json has some configuration, replay the recipes."
- chef-solo -c /var/berks-cookbooks/${CHEF_REPO_NAME}/solo.rb -o recipe[mso-config::apih],recipe[mso-config::bpmn],recipe[mso-config::jra]
-else
- echo "mso-docker.json is empty, do not replay the recipes."
-fi
-
-JBOSS_PIDFILE=/tmp/jboss-standalone.pid
-$JBOSS_HOME/bin/standalone.sh -c standalone-full-ha-mso.xml &
-JBOSS_PID=$!
-# Trap common signals and relay them to the jboss process
-trap "kill -HUP $JBOSS_PID" HUP
-trap "kill -TERM $JBOSS_PID" INT
-trap "kill -QUIT $JBOSS_PID" QUIT
-trap "kill -PIPE $JBOSS_PID" PIPE
-trap "kill -TERM $JBOSS_PID" TERM
-if [ "x$JBOSS_PIDFILE" != "x" ]; then
- echo $JBOSS_PID > $JBOSS_PIDFILE
-fi
-# Wait until the background process exits
-WAIT_STATUS=128
-while [ "$WAIT_STATUS" -ge 128 ]; do
- wait $JBOSS_PID 2>/dev/null
- WAIT_STATUS=$?
- if [ "$WAIT_STATUS" -gt 128 ]; then
- SIGNAL=`expr $WAIT_STATUS - 128`
- SIGNAL_NAME=`kill -l $SIGNAL`
- echo "*** JBossAS process ($JBOSS_PID) received $SIGNAL_NAME signal ***" >&2
- fi
-done
-if [ "$WAIT_STATUS" -lt 127 ]; then
- JBOSS_STATUS=$WAIT_STATUS
-else
- JBOSS_STATUS=0
-fi
-if [ "$JBOSS_STATUS" -ne 10 ]; then
- # Wait for a complete shudown
- wait $JBOSS_PID 2>/dev/null
-fi
-if [ "x$JBOSS_PIDFILE" != "x" ]; then
- grep "$JBOSS_PID" $JBOSS_PIDFILE && rm $JBOSS_PIDFILE
-fi