summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/docker
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-11-17 14:55:16 -0800
committerMichael Morris <michael.morris@est.tech>2022-11-17 23:24:11 +0000
commitab6d8edbe6215f67a33f1fbe7207b9ee0ab4b044 (patch)
tree6c9797803bbe187d57f9e7827a49d64cf4af8482 /catalog-be/src/main/docker
parent525c89bec6979bbd827d9683a970896b42e56097 (diff)
Fix SDC-BE not logging to STDOUT
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3534 Change-Id: Ia3e20b7f43ece61cf28038d59af51264db2b7dec
Diffstat (limited to 'catalog-be/src/main/docker')
-rw-r--r--catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/files/default/logback.xml28
-rw-r--r--catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb2
-rw-r--r--catalog-be/src/main/docker/backend/startup.sh3
3 files changed, 29 insertions, 4 deletions
diff --git a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/files/default/logback.xml b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/files/default/logback.xml
index dc51c16f87..20a00ad528 100644
--- a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/files/default/logback.xml
+++ b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/files/default/logback.xml
@@ -27,7 +27,6 @@
<property name="supportability-log-pattern"
value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{SupportablityComponentName}|%X{SupportablityAction}|%thread|%X{SupportablityComponentUUID}|%X{SupportablityStatus}|ActivityType=&lt;%M&gt;, Desc=&lt;${p_msg}&gt;%n"/>
-
<!-- All log -->
<if condition='property("enable-all-log").equalsIgnoreCase("true")'>
<then>
@@ -95,6 +94,20 @@
</encoder>
</appender>
+ <appender name="DEBUG_STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator> <!-- defaults to type ch.qos.logback.classic.boolex.JaninoEventEvaluator -->
+ <expression>return level &lt;= INFO;</expression>
+ </evaluator>
+ <OnMismatch>DENY</OnMismatch>
+ <OnMatch>ACCEPT</OnMatch>
+ </filter>
+
+ <encoder>
+ <pattern>${debug-log-pattern}</pattern>
+ </encoder>
+ </appender>
+
<!-- Error log -->
<appender name="ERROR_ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
@@ -121,6 +134,17 @@
</encoder>
</appender>
+ <appender name="ERROR_STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>WARN</level>
+ </filter>
+
+ <encoder>
+ <pattern>${error-log-pattern}</pattern>
+ </encoder>
+ </appender>
+
+
<!-- Audit log -->
<appender name="AUDIT_ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
@@ -240,6 +264,8 @@
<appender-ref ref="AUDIT_ROLLING"/>
<appender-ref ref="METRICS_ROLLING"/>
<appender-ref ref="SUPPORTABILITY_ROLLING"/>
+ <appender-ref ref="DEBUG_STDOUT"/>
+ <appender-ref ref="ERROR_STDOUT"/>
<if condition='property("enable-all-log").equalsIgnoreCase("true")'>
<then>
<appender-ref ref="ASYNC_ALL"/>
diff --git a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb
index 772e0d40c0..9e57212176 100644
--- a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb
+++ b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_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
diff --git a/catalog-be/src/main/docker/backend/startup.sh b/catalog-be/src/main/docker/backend/startup.sh
index 5d3b31a67b..c64e4ac200 100644
--- a/catalog-be/src/main/docker/backend/startup.sh
+++ b/catalog-be/src/main/docker/backend/startup.sh
@@ -8,8 +8,7 @@ export JAVA_OPTIONS="$JAVA_OPTIONS -Dconfig.home=$JETTY_BASE/config \
-Dartifactgenerator.config=$JETTY_BASE/config/catalog-be/Artifact-Generator.properties \
-Donboarding_configuration.yaml=$JETTY_BASE/config/onboarding-be/onboarding_configuration.yaml \
-Djavax.net.ssl.trustStore=$JETTY_BASE/etc/org.onap.sdc.trust.jks \
- -Djavax.net.ssl.trustStorePassword=z+KEj;t+,KN^iimSiS89e#p0 \
- -Djetty.console-capture.dir=$JETTY_BASE/logs"
+ -Djavax.net.ssl.trustStorePassword=z+KEj;t+,KN^iimSiS89e#p0"
cd $JETTY_BASE/chef-solo
chef-solo -c solo.rb -E ${ENVNAME}