Single logback.xml in OOM onap parent chart

Description

Discussion with and - I should just be using a single logback.xml
key off single pattern developed with in
https://wiki.acumos.org/display/OAM/Log+Standards
Also lowers config map size issue

Plus Requirements

  • R1: single logback.xml from the 20+ currently in oom - with parameterized inputs

  • R2: retain existing separate in-image logback.xml for heat deployments and local development

  • R3: single logback pattern standard across all onap components

Plus 20180823 Notes
(in progress : https://gerrit.onap.org/r/#/c/62405/)

  • application.log will be error.log from now on

  • missing {p_log} for logger field

  • missing marker field and mdc field

Plus Discussion (Mandeep, Mike)

  • single logback.xml option: all key/value pairs are parameterized as env variables

see wiki

https://wiki.onap.org/display/DW/Logging+Developer+Guide#LoggingDeveloperGuide-Logback.xml

Attachments

1
  • 24 Aug 2018, 05:49 PM
100% Done
0

Activity

Show:

Former user December 9, 2021 at 4:23 PM

This issue belongs to an unmaintained project and has not been updated in 18 months or more, so closing.

Former user January 15, 2019 at 3:23 PM

Former user November 15, 2018 at 12:30 AM

sorry , i accidentally set this to Dublin, was cleaning AAI jira tickets; set it back to Casablanca.

Former user October 6, 2018 at 1:09 AM

address
From: MANTHAN, MUKESH
Sent: Friday, October 05, 2018 5:29 PM
To: LOTT, CHRISTOPHER <clott@research.att.com>; Vikas Raikwar <VR00122945@techmahindra.com>
Cc: WELCH, LORRAINE A <lb2391@att.com>; JORA, SERBAN <jora@research.att.com>
Subject: RE: Still another question about your logback.xml config

Will check

From: LOTT, CHRISTOPHER M (CHRISTOPHER) clott@research.att.com
Sent: Friday, October 05, 2018 4:27 PM
To: Vikas Raikwar; Mukesh Mantan
Cc: WELCH, LORRAINE A; JORA, SERBAN (SERBAN)
Subject: Still another question about your logback.xml config

So here's the pattern in portal's logback.xml, just to make sure I describe the situation correctly:

<property name="newmultiLinePattern"
value="%date{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;,UTC}|%X{EntryTimestamp}|%X{InvokeTimestamp}|%X{RequestID}|%X{InvocationID}|%X{InstanceUUID}|%X{ServiceInstanceID}|${p_thr}|${ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{VirtualServerName}|%X{ContextName}|%X{TargetEntity}|%X{ClassName}|%X{TargetElement}|%X{User}|${p_log}|${p_mdc}|%msg|${p_mrk}%n" />

Serban pointed out today that this apparently suppresses the EXCEPTION CAUSE. I don't know exactly why, but I suspect that placing the marker pattern after the message pattern %msg somehow causes logback to shorten the amount of output it shows for a stack trace. When I restored %msg as the last field, the causes were again printed.

Have you noticed your error.log content is abbreviated? This might be the cause.

HTH

2018-10-04T12:07:19.118Z||2018-10-04T12:07:16.430Z|bf634e75-ba6e-4040-8501-c0de6d8e9b0c|cda46cd1-6162-4c60-8b41-603386ad0832|b5e21d07-f569-4c21-aa2f-3ca2d83b4347||http-nio-8090-
exec-10|writeToLog|Acumos Portal/CLI|INPROGRESS|Success|Success|ERROR|ERROR|||cognita-dev1-vm01-core|172.17.0.1||||org.acumos.onboarding.services.impl.CommonOnboarding||clott|co
m.att.eelf.error|ResponseCode=Success, User=clott, InstanceUUID=b5e21d07-f569-4c21-aa2f-3ca2d83b4347, RequestID=bf634e75-ba6e-4040-8501-c0de6d8e9b0c, InvokeTimestamp=2018-10-04T
12:07:16.430Z, PartnerName=Acumos Portal/CLI, ClientIPAddress=172.17.0.1, ServerFQDN=cognita-dev1-vm01-core, StatusCode=INPROGRESS, ServiceName=/onboarding-app/v2/models, ClassN
ame=org.acumos.onboarding.services.impl.CommonOnboarding, ResponseDescription=Success, InvocationID=cda46cd1-6162-4c60-8b41-603386ad0832|400 |
org.springframework.web.client.HttpClientErrorException: 400

Former user September 25, 2018 at 2:43 PM
Edited

<property name="logDirPrefix" value="/Users/michaelobrien/var/log/onap"></property> in logback.xml the ENV variable is set as a helm values prop or as a JVM env variable (developers) <property name="logDirPrefix" value="${logDirRoot}/log/onap"></property> in values.yaml logDirRoot: /var in deployment.yaml env: #Example environment variable passed to container - name: DEBUG_FLAG value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }} - name: logDirRoot value: {{ .Values.global.logDirRoot | default .Values.logDirRoot | quote }} check ENV var in container ubuntu@ip-172-31-48-194:~$ kubectl exec -it logdemonode-logdemonode-6746cc987b-llp6l -c logdemonode -n onap bash root@logdemonode-logdemonode-6746cc987b-llp6l:/usr/local/tomcat# printenv TOMCAT_MAJOR=8 logDirRoot=/var ubuntu@ip-172-31-48-194:~$ kubectl exec -it logdemonode-logdemonode-58c85758f9-wnkrf -c logdemonode -n onap bash root@logdemonode-logdemonode-58c85758f9-wnkrf:/usr/local/tomcat# ls LICENSE NOTICE RELEASE-NOTES RUNNING.txt bin conf include lib logDirRoot_IS_UNDEFINED logs native-jni-lib temp webapps work root@logdemonode-logdemonode-58c85758f9-wnkrf:/usr/local/tomcat# exit
Won't Do

Details

Assignee

Reporter

Priority

Epic Name

Created August 23, 2018 at 6:34 PM
Updated August 12, 2023 at 3:51 AM
Resolved December 9, 2021 at 4:23 PM

Flag notifications