aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-11-17 15:21:13 -0800
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-11-18 18:18:01 +0000
commit75e64ef5a7904a1a512272c14f75bc91d5c00de7 (patch)
tree0e703f37cabcf67badd76d2cd4e8cae74f90cb4a
parentab6d8edbe6215f67a33f1fbe7207b9ee0ab4b044 (diff)
Fix SDC-FE not logging to STDOUT
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3535 Change-Id: I4191e71132fada9bb63e12521e39072b462ff97a
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/files/default/FE-logback.xml58
-rw-r--r--catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb2
-rw-r--r--catalog-fe/sdc-frontend/startup.sh3
3 files changed, 60 insertions, 3 deletions
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/files/default/FE-logback.xml b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/files/default/FE-logback.xml
index 452262ece6..7249e84b2a 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/files/default/FE-logback.xml
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/files/default/FE-logback.xml
@@ -87,6 +87,36 @@
</encoder>
</appender>
+ <appender name="ERROR_STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+
+ <!-- Audit messages filter - deny audit messages -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>AUDIT_MARKER</marker>
+ </evaluator>
+ <onMismatch>NEUTRAL</onMismatch>
+ <onMatch>DENY</onMatch>
+ </filter>
+
+ <!-- Transaction messages filter - deny Transaction messages -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>TRANSACTION_MARKER</marker>
+ </evaluator>
+ <onMismatch>NEUTRAL</onMismatch>
+ <onMatch>DENY</onMatch>
+ </filter>
+
+ <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>INFO</level>
+ </filter>
+
+ <encoder>
+ <pattern>${default-log-pattern}</pattern>
+ </encoder>
+ </appender>
+
<!-- Debug log -->
<appender name="DEBUG_ROLLING"
class="ch.qos.logback.core.rolling.RollingFileAppender">
@@ -130,6 +160,34 @@
</encoder>
</appender>
+ <appender name="DEBUG_STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+
+ <!-- No need to deny audit messages - they are INFO only, will be denied
+ anyway -->
+ <!-- Transaction messages filter - deny Transaction messages, there are
+ some DEBUG level messages among them -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>TRANSACTION_MARKER</marker>
+ </evaluator>
+ <onMismatch>NEUTRAL</onMismatch>
+ <onMatch>DENY</onMatch>
+ </filter>
+
+ <!-- accept DEBUG and TRACE level -->
+ <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
+ <evaluator> <!-- defaults to type ch.qos.logback.classic.boolex.JaninoEventEvaluator -->
+ <expression>return level &lt;= DEBUG;</expression>
+ </evaluator>
+ <OnMismatch>DENY</OnMismatch>
+ <OnMatch>NEUTRAL</OnMatch>
+ </filter>
+
+ <encoder>
+ <pattern>${default-log-pattern}</pattern>
+ </encoder>
+ </appender>
+
<!-- Audit log -->
<appender name="AUDIT_ROLLING"
class="ch.qos.logback.core.rolling.RollingFileAppender">
diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb
index fb70924d36..734c05ae02 100644
--- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb
+++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb
@@ -7,7 +7,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,rewrite"
+ 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,rewrite"
cwd "#{ENV['JETTY_BASE']}"
action :run
end
diff --git a/catalog-fe/sdc-frontend/startup.sh b/catalog-fe/sdc-frontend/startup.sh
index e44f86629b..68363efb10 100644
--- a/catalog-fe/sdc-frontend/startup.sh
+++ b/catalog-fe/sdc-frontend/startup.sh
@@ -7,8 +7,7 @@ JAVA_OPTIONS="$JAVA_OPTIONS \
-Dconfiguration.yaml=$JETTY_BASE/config/catalog-fe/configuration.yaml \
-Donboarding_configuration.yaml=$JETTY_BASE/config/onboarding-fe/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}