From: mpriyank Date: Thu, 22 Sep 2022 09:41:54 +0000 (+0100) Subject: [CPS] Security logging fields X-Git-Tag: 11.0.0~27^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=oom.git;a=commitdiff_plain;h=314df904244f02122c011803e15012fc9dee2251 [CPS] Security logging fields - Removed the old logback.xml file. - Added logback-spring.xml with the new format for logging in json format - Updated the file mount path in deployment file. - Above change is just for CPS-Core Issue-ID: CPS-1291 Change-Id: If1b657a4959023fc18d0a4710891a55dfeb29b22 Signed-off-by: mpriyank --- diff --git a/kubernetes/cps/components/cps-core/resources/config/logback-spring.xml b/kubernetes/cps/components/cps-core/resources/config/logback-spring.xml new file mode 100644 index 0000000000..03076023b3 --- /dev/null +++ b/kubernetes/cps/components/cps-core/resources/config/logback-spring.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + true + + { + "logTimeStamp": "${currentTimeStamp:-}", + "logTypeName": "", + "logLevel": "%level", + "traceId": "%X{traceId:-}", + "statusCode": "", + "principalId": "${username:-}", + "serviceName": "${springAppName:-}", + "message": "%message", + "spanId": "%X{spanId:-}", + "processId": "${PID:-}", + "threadName": "%thread", + "class": "%logger{40}", + "exception": "%wEx" + } + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/cps/components/cps-core/resources/config/logback.xml b/kubernetes/cps/components/cps-core/resources/config/logback.xml deleted file mode 100644 index 8256cfa18d..0000000000 --- a/kubernetes/cps/components/cps-core/resources/config/logback.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - %d - %highlight(%-5level) [%-20.20thread] %cyan(%logger{36}) - %msg%n - - - - - - - - - - - - diff --git a/kubernetes/cps/components/cps-core/templates/deployment.yaml b/kubernetes/cps/components/cps-core/templates/deployment.yaml index 1b482f405c..3684aab3ac 100644 --- a/kubernetes/cps/components/cps-core/templates/deployment.yaml +++ b/kubernetes/cps/components/cps-core/templates/deployment.yaml @@ -126,8 +126,8 @@ spec: - mountPath: /app/resources/application-helm.yml subPath: application-helm.yml name: init-data - - mountPath: /app/resources/logback.xml - subPath: logback.xml + - mountPath: /app/resources/logback-spring.xml + subPath: logback-spring.xml name: init-data - mountPath: /tmp name: init-temp