From 314df904244f02122c011803e15012fc9dee2251 Mon Sep 17 00:00:00 2001 From: mpriyank Date: Thu, 22 Sep 2022 10:41:54 +0100 Subject: [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 --- .../cps-core/resources/config/logback-spring.xml | 75 ++++++++++++++++++++++ .../cps-core/resources/config/logback.xml | 36 ----------- .../components/cps-core/templates/deployment.yaml | 4 +- 3 files changed, 77 insertions(+), 38 deletions(-) create mode 100644 kubernetes/cps/components/cps-core/resources/config/logback-spring.xml delete mode 100644 kubernetes/cps/components/cps-core/resources/config/logback.xml (limited to 'kubernetes') 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 -- cgit 1.2.3-korg