diff options
author | MichaelMorris <michael.morris@est.tech> | 2022-11-17 14:55:16 -0800 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2022-11-17 23:24:11 +0000 |
commit | ab6d8edbe6215f67a33f1fbe7207b9ee0ab4b044 (patch) | |
tree | 6c9797803bbe187d57f9e7827a49d64cf4af8482 /catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be | |
parent | 525c89bec6979bbd827d9683a970896b42e56097 (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/backend/chef-repo/cookbooks/sdc-catalog-be')
2 files changed, 28 insertions, 2 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=<%M>, Desc=<${p_msg}>%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 <= 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 |