summaryrefslogtreecommitdiffstats
path: root/packages/policy-xacmlpdp-tarball/src/main
diff options
context:
space:
mode:
authorjh7358 <jh7358@att.com>2019-04-25 20:15:28 -0400
committerJim Hahn <jrh3@att.com>2019-04-26 17:16:27 -0400
commit05045cd36ad264b5d7b674155699b2cccee71165 (patch)
treef2651c9b19f09f7944339ab07fc706bc5d6cd8f3 /packages/policy-xacmlpdp-tarball/src/main
parentc7beb45738209526a4794b3b72f0f0bd025d1a82 (diff)
Refactor xacml-pdp to remove various statics3.0.2-ONAP
Refactored xacml-pdp to eliminate a number of static fields. Modified junit tests to allocate new ports for each test. Also modified XacmlPolicyUtilsTest to convert path names to match the file system so that the junit will work in OSs other than linux. Replaced logback.xml with a copy of the one from PAP to resolve some issues. Don't print entire message when discarding, as each PDP receives messages for ALL PDPs. Remove shutdown class from Main - just invoke this.shutdown() directly. Added additional comments to CommonRest. Also modified port test parameters. Change-Id: Id8bf7216cdcb59a1a2cb4cb957fa44f640315cfe Issue-ID: POLICY-1645 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'packages/policy-xacmlpdp-tarball/src/main')
-rw-r--r--packages/policy-xacmlpdp-tarball/src/main/resources/etc/logback.xml103
1 files changed, 21 insertions, 82 deletions
diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/etc/logback.xml b/packages/policy-xacmlpdp-tarball/src/main/resources/etc/logback.xml
index 83e13d7f..34cfc0a5 100644
--- a/packages/policy-xacmlpdp-tarball/src/main/resources/etc/logback.xml
+++ b/packages/policy-xacmlpdp-tarball/src/main/resources/etc/logback.xml
@@ -13,28 +13,23 @@
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.
-
- SPDX-License-Identifier: Apache-2.0
============LICENSE_END=========================================================
-->
-<configuration scan="true" scanPeriod="3 seconds" debug="true">
+
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
<property name="logDir" value="${POLICY_LOGS}" />
<property name="errorLog" value="error" />
<property name="debugLog" value="debug" />
<property name="networkLog" value="network" />
- <property name="metricLog" value="metric" />
- <property name="transactionLog" value="audit" />
- <property name="debugPattern" value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
+ <property name="debugPattern"
+ value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
<property name="errorPattern" value="${debugPattern}" />
<property name="networkPattern" value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
- <property name="metricPattern"
- value="%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}|%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}|%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}|%X{TargetVirtualEntity}|%level|%thread| %msg%n" />
- <property name="transactionPattern" value="${metricPattern}" />
- <appender name="errorOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <appender name="ErrorOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDir}/${errorLog}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
@@ -51,48 +46,29 @@
</encoder>
</appender>
- <appender name="asyncErrorOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="errorOut" />
+ <appender name="AsyncErrorOut" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="ErrorOut" />
</appender>
- <appender name="debugOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${debuLog}.log</file>
+ <appender name="DebugOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDir}/${debugLog}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
+ <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
<totalSizeCap>10GB</totalSizeCap>
</rollingPolicy>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>DEBUG</level>
- </filter>
<encoder>
<pattern>${debugPattern}</pattern>
</encoder>
</appender>
- <appender name="asyncDebugOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="debugOut" />
+ <appender name="AsyncDebugOut" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="DebugOut" />
</appender>
- <appender name="metricOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${metricsLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logDir}/${metricsLog}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${metricPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="asyncMetricOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="metricOut" />
- </appender>
-
- <appender name="networkOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <appender name="NetworkOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logDir}/${networkLog}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
@@ -106,58 +82,21 @@
</encoder>
</appender>
- <appender name="asyncNetworkOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="networkOut" />
- </appender>
-
- <appender name="transactionOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${transactionLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${transactionPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="asyncTransactionOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="transactionOut" />
+ <appender name="AsyncNetworkOut" class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="NetworkOut" />
</appender>
- <logger name="metrics" level="info" additivity="false">
- <appender-ref ref="asyncMetricsOut" />
- </logger>
-
- <logger name="error" level="error" additivity="false">
- <appender-ref ref="asyncErrorOut" />
+ <logger name="network" level="INFO" additivity="false">
+ <appender-ref ref="AsyncNetworkOut" />
</logger>
- <logger name="debug" level="debug" additivity="false">
- <appender-ref ref="asyncDebugOut" />
- </logger>
-
- <logger name="network" level="info" additivity="false">
- <appender-ref ref="asyncNetworkOut" />
- </logger>
-
<logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false">
- <appender-ref ref="asyncNetworkOut" />
- </logger>
-
- <logger name="transactionOut" level="info" additivity="false">
- <appender-ref ref="asyncTransactionOut" />
+ <appender-ref ref="AsyncNetworkOut" />
</logger>
<root level="INFO">
- <appender-ref ref="asyncDebugOut" />
- <appender-ref ref="asyncErrorOut" />
- <appender-ref ref="asyncMetricOut" />
- <appender-ref ref="asyncTransactionOut" />
- <appender-ref ref="asyncNetworkOut" />
+ <appender-ref ref="AsyncDebugOut" />
+ <appender-ref ref="AsyncErrorOut" />
</root>
</configuration>