Updating Log4j console to comply with Logging GR 85/132585/7
authorBert Sloan <rs833t@att.com>
Mon, 5 Dec 2022 19:57:03 +0000 (19:57 +0000)
committerBert Sloan <rs833t@att.com>
Mon, 5 Dec 2022 21:30:52 +0000 (21:30 +0000)
Issue-ID: DCAEGEN2-3257
Change-Id: Ic9c4c2e6eb3312fe02a8a9ed003e4326747813bd
Signed-off-by: Bert Sloan <rs833t@att.com>
Changelog.md
pom.xml
src/main/resources/log4j2.xml
version.properties

index 1a390d2..1a317ab 100644 (file)
@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/)
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
+## [1.12.1] - 2022/12/05
+         - [DCAEGEN2-3257] - Align DCAE components with the new logging GR.
 
 ## [1.12.0] - 2022/10/10
          - [DCAEGEN2-3295] - SDK upgrade to 1.9.0 (CBSclient changed to remove CBS/Consul parameters) 
@@ -103,4 +105,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 
 ## [1.6.0] - 2020/05/13
         - [DCAEGEN2-608](https://jira.onap.org/browse/DCAEGEN2-608) - Expose Prometheus API for performance tests
-
diff --git a/pom.xml b/pom.xml
index 0133ee4..1b46060 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
   </parent>
   <groupId>org.onap.dcaegen2.collectors.ves</groupId>
   <artifactId>VESCollector</artifactId>
-  <version>1.12.0-SNAPSHOT</version>
+  <version>1.12.1-SNAPSHOT</version>
   <name>dcaegen2-collectors-ves</name>
   <description>VESCollector</description>
   <properties>
index 76d3411..49f4e72 100644 (file)
@@ -1,4 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+============LICENSE_START=======================================================
+    dcaegen2-collectors-ves
+================================================================================
+Copyright (c) 2022 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=========================================================
+
+-->
 
 <Configuration status="INFO">
 
@@ -6,8 +26,17 @@
 
     <Console name="CONSOLE" target="SYSTEM_OUT" >
       <LevelRangeFilter maxLevel="INFO" minLevel="ERROR"/>
-      <PatternLayout
-        pattern="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} %highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=green, DEBUG=green bold, TRACE=blue} %style{${sys:PID}}{magenta} [%15.15t] %style{%-40.40C{1.}}{cyan} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
+      <JsonLayout eventEOL="true" compact="true" stacktraceAsString="true" properties="true" propertiesAsList="true">
+        <KeyValuePair key="logTimeStamp" value="$${date:yyyy-MM-dd HH:mm:ss:-null}" />
+        <KeyValuePair key="logTypeName" value="$${event:Logger:-null}" />
+        <KeyValuePair key="logLevel" value="$${event:Level:-null}" />
+        <KeyValuePair key="traceId" value="${:-null}" />
+        <KeyValuePair key="statusCode" value="${:-null}" />
+        <KeyValuePair key="pricipalId" value="${:-vescollector}" />
+        <KeyValuePair key="serviceName" value="${k8s:containerName:-vescollector}" />
+        <KeyValuePair key="exception" value="$${event:Exception:-None}" />
+        <KeyValuePair key="PID" value="$${sys:pid:-null}" />
+      </JsonLayout>
     </Console>
 
     <RollingFile fileName="logs/collector.log" filePattern="logs/collector-%d{yyyy-MM-dd}-%i.log" name="ROL_CONSOLE">
index ad7c01e..a00a7fb 100644 (file)
@@ -1,6 +1,6 @@
 major=1
 minor=12
-patch=0
+patch=1
 base_version=${major}.${minor}.${patch}
 release_version=${base_version}
 snapshot_version=${base_version}-SNAPSHOT