aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBert Sloan <rs833t@att.com>2022-12-05 19:57:03 +0000
committerBert Sloan <rs833t@att.com>2022-12-05 21:30:52 +0000
commit3c31bdcdf18aff4bf755058e2d32e153d8216eb5 (patch)
treed989e619b6cba33cf4b38bdad14ceb63b499ae65
parent3e0b4043c112f98cead6590a394bd29af3b264ed (diff)
Updating Log4j console to comply with Logging GR
Issue-ID: DCAEGEN2-3257 Change-Id: Ic9c4c2e6eb3312fe02a8a9ed003e4326747813bd Signed-off-by: Bert Sloan <rs833t@att.com>
-rw-r--r--Changelog.md3
-rw-r--r--pom.xml2
-rw-r--r--src/main/resources/log4j2.xml33
-rw-r--r--version.properties2
4 files changed, 35 insertions, 5 deletions
diff --git a/Changelog.md b/Changelog.md
index 1a390d2d..1a317ab4 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -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 0133ee44..1b460601 100644
--- 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>
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 76d34118..49f4e72a 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -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">
diff --git a/version.properties b/version.properties
index ad7c01ec..a00a7fb9 100644
--- a/version.properties
+++ b/version.properties
@@ -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