From 0ae35d1245e9a5a0f1a1a3367c1b87bcf2890212 Mon Sep 17 00:00:00 2001 From: vasraz Date: Sat, 19 Nov 2022 12:30:55 +0000 Subject: Fix SDC-ONBOARDING-BE not logging to STDOUT Signed-off-by: Vasyl Razinkov Change-Id: Icb81b67f199e3927edaf3bfcee8178724245c804 Issue-ID: SDC-3536 --- .../sdc-onboard-backend/files/default/logback.xml | 65 +++++++++++++++------- .../recipes/ON_4_setup_jetty_modules.rb | 2 +- 2 files changed, 46 insertions(+), 21 deletions(-) (limited to 'openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks') diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/logback.xml b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/logback.xml index e709735fdb..5b11824969 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/logback.xml +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/files/default/logback.xml @@ -6,26 +6,26 @@ + value="%replace(%replace(%replace(%replace(%msg){'\t','\\\\t'}){'\n', '\\\\n'}){'\r','\\\\r'}){'\\\|','-'}"/> + value="%replace(%replace(%replace(%replace(%exception{full}){'\t','\\\\t'}){'\n', '\\\\n'}){'\r','\\\\r'}){'\\\|','-'}"/> + value="%replace(%replace(%replace(%replace(%thread # %level # %logger{35} # %msg){'\t','\\\\t'}){'\n', '\\\\n'}){'\r','\\\\r'}){'\\\|','-'}"/> + value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|${ECOMP-subcomponent-name}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%level|%X{AlertSeverity}|%X{ServerIpAddress}|%X{ElapsedTime}|${ServerFQDN}|%X{ClientIPAddress}|%logger{35}|%X{timer}|ActivityType=<%M>, Desc=<${p_msg}>%n"/> + value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|${p_debugInfo} ${p_ex}|^\n %n%nopex"/> + value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|500|${p_msg} ${p_ex}|%n%nopex"/> + value="%X{EntryTimestamp}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIpAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%marker|InvocationID=%X{InvocationID}|%X{CustomField3}|%X{CustomField4}|ActivityType=<%M>, Desc=<${p_msg}>%n"/> + value="%X{InvokeTimestamp}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIpAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{ClientIPAddress }|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|ActivityType=<%M>, Desc=<${p_msg}>%n"/> @@ -34,7 +34,8 @@ ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log - ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log.%i + + ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log.%i 1 10 @@ -51,7 +52,6 @@ - ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log @@ -76,7 +76,8 @@ - ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log.%i + + ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log.%i 1 10 @@ -91,7 +92,6 @@ - ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.log @@ -102,7 +102,8 @@ - ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.log.%i + + ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.log.%i 1 10 @@ -117,7 +118,6 @@ - ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log @@ -133,7 +133,8 @@ - ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log.%i + + ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log.%i 1 10 @@ -148,10 +149,9 @@ - + class="ch.qos.logback.core.rolling.RollingFileAppender"> ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/metrics.log @@ -166,7 +166,8 @@ - ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/metrics.log.%i + + ${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/metrics.log.%i 1 10 @@ -181,7 +182,6 @@ - @@ -195,12 +195,37 @@ + + + + return level <= INFO; + + DENY + ACCEPT + + + + ${debug-log-pattern} + + + + + + WARN + + + + ${error-log-pattern} + + + + @@ -210,4 +235,4 @@ - \ No newline at end of file + diff --git a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb index 9fe747851e..6b2b79b49c 100644 --- a/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb +++ b/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/recipes/ON_4_setup_jetty_modules.rb @@ -6,7 +6,7 @@ else end execute "create-jetty-modules" do - command "java -jar #{ENV['JETTY_HOME']}/start.jar --add-to-start=deploy && java -jar #{ENV['JETTY_HOME']}/start.jar --create-startd --add-to-start=http,https,console-capture,setuid" + command "java -jar #{ENV['JETTY_HOME']}/start.jar --add-to-start=deploy && java -jar #{ENV['JETTY_HOME']}/start.jar --create-startd --add-to-start=http,https,setuid" cwd "#{ENV['JETTY_BASE']}" action :run end -- cgit 1.2.3-korg